pub macro ready($e:expr) { ...}Expand description
Extracts the successful type of aPoll<T>.
This macro bakes in propagation ofPending signals by returning early.
§Examples
usestd::task::{ready, Context, Poll};usestd::future::{self, Future};usestd::pin::Pin;pub fndo_poll(cx:&mutContext<'_>) -> Poll<()> {letmutfut = future::ready(42);letfut = Pin::new(&mutfut);letnum =ready!(fut.poll(cx));// ... use numPoll::Ready(())}Theready! call expands to: