core::future
Future / Poll / Context / Waker /
IntoFuture.
await e (inside an async body) polls e - or e.into_future() when
e has no poll - until Ready, suspending the coroutine with
Pending in between (nabic_typeck::lower::coro).
Structs
WakerSource
pub struct WakerAsks the executor to poll a task again: a handle to the task
(core::task), usable from any thread.
Schedule the task again.
ContextSource
pub struct ContextWhat a poll gets from the executor.
A context that wakes through
waker.The waker of the task being polled.
Trait implementations 1
impl Debug for Context
AsyncFutureSource
pub struct AsyncFuture<T>TryAsyncFutureSource
pub struct TryAsyncFuture<T, E>A throwing async body (async fn f() throws (E) -> T): the error
comes out of poll, so try await f(). Not a
Future (whose poll cannot throw); await and task::try_block_on
take it.
Resume the body:
Readywith its value, orPending; throws what the body throws.
Enums
PollSource
pub enum Poll<T>The state of a future after one poll: Ready with its output, or
Pending until its waker fires.
trueforReady.trueforPending.
Traits
FutureSource
pub trait FutureAn asynchronous computation.
Ready(output)once done, elsePending; the waker inctxis woken when it may progress.
IntoFutureSource
pub trait IntoFutureWhat await accepts besides a Future.
A future for the value.