Enum core::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
impl<T> Poll<T>[src]
impl<T> Poll<T>[src]impl<T, E> Poll<Result<T, E>>[src]
impl<T, E> Poll<Result<T, E>>[src]impl<T, E> Poll<Option<Result<T, E>>>[src]
impl<T, E> Poll<Option<Result<T, E>>>[src]Trait Implementations
impl<T, E, F: From<E>> FromResidual<Result<Infallible, E>> for Poll<Result<T, F>>[src]
impl<T, E, F: From<E>> FromResidual<Result<Infallible, E>> for Poll<Result<T, F>>[src]fn from_residual(x: Result<Infallible, E>) -> Self[src]
fn from_residual(x: Result<Infallible, E>) -> Self[src]Constructs the type from a compatible Residual type. Read more
impl<T, E, F: From<E>> FromResidual<Result<Infallible, E>> for Poll<Option<Result<T, F>>>[src]
impl<T, E, F: From<E>> FromResidual<Result<Infallible, E>> for Poll<Option<Result<T, F>>>[src]fn from_residual(x: Result<Infallible, E>) -> Self[src]
fn from_residual(x: Result<Infallible, E>) -> Self[src]Constructs the type from a compatible Residual type. Read more
impl<T: Ord> Ord for Poll<T>[src]
impl<T: Ord> Ord for Poll<T>[src]#[must_use]fn max(self, other: Self) -> Self where
Self: Sized, 1.21.0[src]
#[must_use]fn max(self, other: Self) -> Self where
Self: Sized, 1.21.0[src]Compares and returns the maximum of two values. Read more
impl<T: PartialOrd> PartialOrd<Poll<T>> for Poll<T>[src]
impl<T: PartialOrd> PartialOrd<Poll<T>> for Poll<T>[src]fn partial_cmp(&self, other: &Poll<T>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Poll<T>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T, E> Try for Poll<Result<T, E>>[src]
impl<T, E> Try for Poll<Result<T, E>>[src]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
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>[src]
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>[src]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
impl<T, E> Try for Poll<Option<Result<T, E>>>[src]
impl<T, E> Try for Poll<Option<Result<T, E>>>[src]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
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>[src]
fn branch(self) -> ControlFlow<Self::Residual, Self::Output>[src]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
impl<T: Copy> Copy for Poll<T>[src]
impl<T: Eq> Eq for Poll<T>[src]
impl<T> StructuralEq for Poll<T>[src]
impl<T> StructuralPartialEq for Poll<T>[src]
Auto Trait Implementations
impl<T> Send for Poll<T> where
T: Send,
T: Send,
impl<T> Sync for Poll<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Poll<T> where
T: Unpin,
T: Unpin,