코딩Coding/★Rust★기초★Syntax
destructure a tuple value
내인생PLUS
2023. 9. 29. 12:39
728x90
fn main() {
let tup = (500, 6.4, 1);
let (x, y, z) = tup;
println!("The value of y is: {y}");
}
https://doc.rust-lang.org/book/ch03-02-data-types.html
Data Types - The Rust Programming Language
Every value in Rust is of a certain data type, which tells Rust what kind of data is being specified so it knows how to work with that data. We’ll look at two data type subsets: scalar and compound. Keep in mind that Rust is a statically typed language,
doc.rust-lang.org
반응형