Rust
03 Sep 2026
9 min read
Understand Pin and Unpin in Rust
Most Rust values can move freely. Assign a value to another variable, pass it by value, return it from a function, or replace it inside a container, and the value may end up at a different memory address. Usually that is exactly what you want. Rust’s ownership model tracks who owns a value, not where that value must remain in memory. A smaller class of types is different. Some values become address-sensitive: code relies on the value continuing to exist at the same memory location. Compiler-generated futures and carefully designed self-referential structures are common examples.