Ownership in Rust, Part 2

It’s still not problem.

Checkout Ownership in Rust, Part 1.

When we looked at ownership in Rust last time, we looked at how Rust uses scope to determine when a resource/data in memory should be dropped or freed.

We saw that for types that have a “copy trait,” (i.e. types whose data can be stored on the stack), the ownership model behaves similarly to other languages that may use a different paradigm, like garbage collection. But for types without this trait, we needed to be more conscious of the ownership rules.

Despite the design compromises that ownership may introduce, it makes up for it with flexibility, explicitness, and safety.

Ownership and Functions