Rust logo
Rust 1.76.0
07dca489a

Ownership

There is a new edition of the book and this is an old link.

Ownership is Rust’s most unique feature, and it enables Rust to make memory safety guarantees without needing a garbage collector.

  1. Each value in Rust has a variable that’s called its owner.
  2. There can only be one owner at a time.
  3. When the owner goes out of scope, the value will be dropped.

Here are the relevant sections in the new and old books: