Rules of Rust Value Ownership

As a part of Memory Management in Rust, the rules for ownership of a value are:

  1. Every value in Rust has a variable called owner
  2. A value only has one owner at a time
  3. When an owner drops out of scope, the value is dropped