notes

Log | Files | Refs | README

shared_and_exclusive_reference.md (332B)


      1 # Shared and Exclusive Reference
      2 
      3 # Shared vs. Exclusive References in Rust
      4 
      5 In Rust, there are two kinds of references:
      6 
      7 - `&T` — a shared reference: multiple parties can hold one at the same time, but
      8   mutation is normally forbidden
      9 
     10 - `&mut T` — an exclusive reference: only one party can hold it, and mutation is
     11   allowed