Rust is a statically typed language, which means that it must know the types of all variables at compile time.

the compiler usually infers that datatype of the variable based on its value.

We’ll look at two data type subsets: scalar and compound.

all of these datatypes values are allocated in the stack

scalar types

integer

floating point

booleans

characters

compound types

tuple

strings

String is a string type provided by the standard library that is a growable, UTF-8 encoded bit of text.

example

let mut guess = String::new()

the :: after String is to call the function inside the struct.