Types
Types in Rust are a way to define the kind of data that can be stored and manipulated within a program. Rust is a statically typed language, which means that the type of every variable must be known at compile time. This helps catch many errors early in the development process and ensures memory safety.
Categories of Types in Rust
Scalar Types: Represent a single value.
Compound Types: Group multiple values into one type.
User-Defined Types: Custom types defined by the user such as struct and enum.