pub struct Pending<T> { /* private fields */ }Expand description
Pending is a decode result on its way.
It is a Future: .await it on any single-threaded executor, or wrap it so its waker also
wakes an event loop. A host that runs a frame loop instead calls try_take
once a frame. Dropping a Pending cancels the work if it has not started.
The type is !Send on purpose: the inline loader runs the decode inside poll, on the
polling thread, and an opened Codec belongs to that thread too.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Pending<T>
impl<T> !Send for Pending<T>
impl<T> !Sync for Pending<T>
impl<T> !UnwindSafe for Pending<T>
impl<T> Freeze for Pending<T>
impl<T> Unpin for Pending<T>
impl<T> UnsafeUnpin for Pending<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more