Trilha de aprendizado

Ownership e borrowing

Moves, referências, slices, lifetimes e ponteiros inteligentes: as ideias que dão a Rust segurança de memória sem coletor de lixo.

5 lições · 7 desafios

  1. Lição 1 desafio Ownership and Moves Learn the rule behind Rust's memory safety: every value has one owner.
  2. Lição 2 desafios References and Borrowing Let a function use a value without taking ownership of it.
  3. Lição 2 desafios Slices Borrow part of a string or array without copying it.
  4. Lição 1 desafio Lifetimes Tell the compiler how long references stay valid with lifetime annotations.
  5. Lição 1 desafio Smart Pointers: Box and Rc Put data on the heap with Box and share ownership with Rc.