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. Pass ownership of String to function
  18. Borrow String when passing to a function
  19. Borrow &str when passing String to a function
  20. Rust function to change string
  21. Rust function to change integer (i32)
  22. Lifetime annotation
  23. Change vector of structs
  24. Try to return &str from function
  25. Exercise: concatenate file content
  26. Pass vector to function