Ownership and borrowing
The concept that makes Rust unique: who owns a value, who may read it, who may change it.
- 1The ownership rulesA single owner, moves, and automatic cleanup.
- 2References and borrowingLend a value without giving it away: & and &mut.
- 3Slices&str and &[T]: views over part of a collection.
- ◆Project: aggregate without copyingRunning projectriskforge moves to slices: reusable functions, zero copies.