Poll

Type Alias Poll 

Source
pub type Poll<T = ()> = Poll<T>;
Expand description

Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.

Aliased Type§

pub enum Poll<T = ()> {
    Ready(T),
    Pending,
}

Variants§

§1.36.0

Ready(T)

Represents that a value is immediately ready.

§1.36.0

Pending

Represents that a value is not ready yet.

When a function returns Pending, the function must also ensure that the current task is scheduled to be awoken when progress can be made.