Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Rust
/
Pin and Unpin
Why does Future::poll receive self as Pin<&mut Self>?
from Pin and Unpin
Rust 1.98
intermediate
1 min
Why does Future::poll receive self as Pin<&mut Self>?
It lets any future implementation rely on address stability between polls, including implementations with address-sensitive state.
Every future is always self-referential and heap allocated.
Pin automatically wakes a pending future.
The receiver makes every future implement Unpin.
Check
Ask AI about this kata
Report an error
next kata
What happens when a Pin<Box<T>> binding is moved to another variable?
Quiz
A new version is available
Reload