pub struct Pending<T> { /* private fields */ }Expand description
The receiving end: an answer that may not exist yet.
Implementations§
Source§impl<T> Pending<T>
impl<T> Pending<T>
Sourcepub fn poll_ready(&mut self) -> PendingPoll<T>
pub fn poll_ready(&mut self) -> PendingPoll<T>
Take the answer if it has arrived, without waiting.
Sourcepub fn wait(self) -> Option<T>
pub fn wait(self) -> Option<T>
Block the calling thread until the answer arrives, however long that takes. For threads that do not drive the answer’s producer.
Sourcepub fn wait_timeout(self, timeout: Duration) -> Result<Option<T>, Self>
pub fn wait_timeout(self, timeout: Duration) -> Result<Option<T>, Self>
Block the calling thread until the answer arrives or timeout
passes. For threads that do not drive the answer’s producer.
Trait Implementations§
Auto Trait Implementations§
impl<T> Forget for Pending<T>
impl<T> Freeze for Pending<T>
impl<T> Move for Pending<T>
impl<T> RefUnwindSafe for Pending<T>where
Arc<Slot<T>>: RefUnwindSafe,
impl<T> Send for Pending<T>
impl<T> Sync for Pending<T>
impl<T> Unpin for Pending<T>
impl<T> UnsafeUnpin for Pending<T>where
Arc<Slot<T>>: UnsafeUnpin,
impl<T> UnwindSafe for Pending<T>where
Arc<Slot<T>>: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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