rsRustPrimer
< Back to modules

Ownership and borrowing

The concept that makes Rust unique: who owns a value, who may read it, who may change it.

  1. 1
    The ownership rulesA single owner, moves, and automatic cleanup.
  2. 2
    References and borrowingLend a value without giving it away: & and &mut.
  3. 3
    Slices&str and &[T]: views over part of a collection.
  4. ◆
    Project: aggregate without copyingRunning projectriskforge moves to slices: reusable functions, zero copies.