Sheerluck's Digital Garden

Home

❯

Notes

❯

Understanding Rust Ownership

Understanding Rust Ownership

Sep 22, 20261 min read

Rust Uses Ownership to Decide Who is Responsible For A Value

Stack and Heap Storage Explain Why A `String` Needs An Owner

Rust Drops An Owned Value When its Owner Leaves Scope

Assigning A String Moves Its Ownership

Cloning A String Creates Another Owned Allocation

Values Implementing Copy Remain Usable After Assignment

Passing An Owned Value Into A Function Can Move It

Borrowing Lets A Function Use A Value Without Owning It

A Mutable Reference Gives Temporary Permission To Change A Value

Rust Allows Many Readers or One Writer At A Time

Rust Prevents References From Outliving Their Owners

A String Slice Borrows Part of Existing String Data

A Live String Slice Restricts Mutation Of Its Source

Rust String Slice Indices Refer To UTF-8 Byte Boundaries

Rust Project - Build A Zero-Copy Log Line Parser


Graph View

Created with Quartz v5.0.0 © 2026

  • Substack
  • RSS
  • X
  • Bluesky
  • GitHub
  • YouTube
  • Sponsor