Enum std::task::Poll 1.36.0[−][src]
#[must_use = "this `Poll` may be a `Pending` variant, which should be handled"] pub enum Poll<T> { Ready(T), Pending, }
Expand description
Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.
Variants
Represents that a value is immediately ready.
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.
Implementations
Changes the ready value of this Poll
with the closure provided.
Returns true
if this is Poll::Pending
Changes the success value of this Poll
with the closure provided.
Trait Implementations
impl<T, E, F> FromResidual<Result<Infallible, E>> for Poll<Option<Result<T, F>>> where
F: From<E>,
[src]
impl<T, E, F> FromResidual<Result<Infallible, E>> for Poll<Option<Result<T, F>>> where
F: From<E>,
[src]This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
The type of the value produced by ?
when not short-circuiting.
type Residual = Result<Infallible, E>
type Residual = Result<Infallible, E>
The type of the value passed to FromResidual::from_residual
as part of ?
when short-circuiting. Read more
Used in ?
to decide whether the operator should produce a value
(because this returned ControlFlow::Continue
)
or propagate a value back to the caller
(because this returned ControlFlow::Break
). Read more
The type of the value produced by ?
when not short-circuiting.
type Residual = Result<Infallible, E>
type Residual = Result<Infallible, E>
The type of the value passed to FromResidual::from_residual
as part of ?
when short-circuiting. Read more
Used in ?
to decide whether the operator should produce a value
(because this returned ControlFlow::Continue
)
or propagate a value back to the caller
(because this returned ControlFlow::Break
). Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Poll<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Poll<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more