Rust TutorialLesson 8Free preview
Rust Data Types
This lesson is part of Rust · All levels
Summary
This lesson reviews the statically typed data type system in Rust. Rust has scalar types such as integers, floating-points, booleans, and characters, as well as compound types such as tuple and array. The compiler also has a smart type inference feature to automatically guess the data type.
Key points
- Rust is a statically typed language in which all types of variables must be known when compilation
- The integer type is available in both marked (i8..i128, isize) and unmarked (u8..u128, usize) variants.
- The standard floating-point type includes f32 and f64 (f64 is default)
- The 'char' type in Rust is 4 bytes and supports full Unicode characters
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.