Ownership gives every value one responsible owner, makes resource management explicit, and destroys the value when that owner leaves scope. This provides memory safety without garbage collection while retaining control over memory layout. section 1.2.2
Apply the model through three related rules:
- Moving a value to another owner prevents the original owner from using it. section 1.2.2
- Borrowing grants temporary access through references, without transferring ownership. section 1.2.2
- Immutable references (&T) permit sharing without mutation; mutable references (&mut T) permit mutation without other simultaneous borrows. section 1.2.2
Scope and borrowing
A value is automatically destroyed when its owner goes out of scope. A borrowed reference must not outlive the value, and the borrow checker enforces these constraints at compile time. section 1.2.2





