#[must_use = "futures do nothing unless polled"]
pub struct Receiver<T> { /* fields omitted */ }
A future for a value that will be provided by another asynchronous task.
This is created by the channel
function.
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.
Executes the destructor for this type. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
The result of the Future
.
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
type Ok = T
The type of successful values yielded by this future
The type of failures yielded by this future
Poll this TryFuture
as if it were a Future
. Read more