Rust logo
Rust 1.27.1
5f2b325f6

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: