Struct futures_channel::oneshot::Receiver
source · [−]pub struct Receiver<T> { /* private fields */ }
Expand description
A future for a value that will be provided by another asynchronous task.
This is created by the channel
function.
Implementations
Gracefully close this receiver, preventing any subsequent attempts to send to it.
Any send
operation which happens after this method returns is
guaranteed to fail. After calling this method, you can use
Receiver::poll
to determine whether a
message had previously been sent.
Attempts to receive a message outside of the context of a task.
Does not schedule a task wakeup or have any other side effects.
A return value of None
must be considered immediately stale (out of
date) unless close
has been called first.
Returns an error if the sender was dropped.
Trait Implementations
Returns true
if the underlying future should no longer be polled.
Auto Trait Implementations
impl<T> !RefUnwindSafe for Receiver<T>
impl<T> !UnwindSafe for Receiver<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
into_future
)Which kind of future are we turning this into?
into_future
)Creates a future from a value.