Pinning and Self-Referential Types

Updated

October 31, 2026

Pinning and Self-Referential Types

Pin guarantees that an underlying value cannot be moved in memory. This is essential for state machines generated by async/await which contain self-referential pointers to local variables on their stack frame.