Variable ownership in Rust

  1. Stack and Heap
  2. Integers are copies
  3. Passing integers to functions and returning integer
  4. Mutable integers are copies
  5. Immutable integers are copies
  6. Pass integer to function return changed value
  7. Pass mutable reference of integer to function
  8. Literal string
  9. Literal string in mutable variable
  10. Passing literal string to function
  11. Mutable string in immutable variable
  12. Mutable string
  13. Move strings
  14. Move mutable string
  15. Rust clone a String
  16. Rust ownership - borrow String
  17. Rust ownership string in function
  18. Rust ownership borrow string in function
  19. Rust function to change string
  20. Rust function to change integer (i32)
  21. Lifetime annotation
  22. Change vector of structs