Pinning and Self-Referential Types
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.