Variable ownership in Rust
- Stack and Heap
- Integers are copies
- Passing integers to functions and returning integer
- Mutable integers are copies
- Immutable integers are copies
- Pass integer to function return changed value
- Pass mutable reference of integer to function
- Literal string
- Literal string in mutable variable
- Passing literal string to function
- Mutable string in immutable variable
- Mutable string
- Move strings
- Move mutable string
- Rust clone a String
- Rust ownership - borrow String
- Pass ownership of String to function
- Borrow String when passing to a function
- Borrow &str when passing String to a function
- Rust function to change string
- Rust function to change integer (i32)
- Lifetime annotation
- Change vector of structs
- Try to return &str from function
- Exercise: concatenate file content
- Pass vector to function