Enum futures_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> 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]pub fn from_residual(x: Result<Infallible, E>) -> Poll<Option<Result<T, F>>>
[src]
pub fn from_residual(x: Result<Infallible, E>) -> Poll<Option<Result<T, F>>>
[src]try_trait_v2
)Constructs the type from a compatible Residual
type. Read more
impl<T, E, F> FromResidual<Result<Infallible, E>> for Poll<Result<T, F>> where
F: From<E>,
[src]
impl<T, E, F> FromResidual<Result<Infallible, E>> for Poll<Result<T, F>> where
F: From<E>,
[src]pub fn from_residual(x: Result<Infallible, E>) -> Poll<Result<T, F>>
[src]
pub fn from_residual(x: Result<Infallible, E>) -> Poll<Result<T, F>>
[src]try_trait_v2
)Constructs the type from a compatible Residual
type. Read more
impl<T> Ord for Poll<T> where
T: Ord,
[src]
impl<T> Ord for Poll<T> where
T: Ord,
[src]impl<T> PartialOrd<Poll<T>> for Poll<T> where
T: PartialOrd<T>,
[src]
impl<T> PartialOrd<Poll<T>> for Poll<T> where
T: PartialOrd<T>,
[src]pub fn partial_cmp(&self, other: &Poll<T>) -> Option<Ordering>
[src]
pub 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) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.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) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.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<Option<Result<T, E>>>
[src]
impl<T, E> Try for Poll<Option<Result<T, E>>>
[src]type Output = Poll<Option<T>>
type Output = Poll<Option<T>>
try_trait_v2
)The type of the value produced by ?
when not short-circuiting.
type Residual = Result<Infallible, E>
type Residual = Result<Infallible, E>
try_trait_v2
)The type of the value passed to FromResidual::from_residual
as part of ?
when short-circuiting. Read more
pub fn from_output(
c: <Poll<Option<Result<T, E>>> as Try>::Output
) -> Poll<Option<Result<T, E>>>
[src]
pub fn from_output(
c: <Poll<Option<Result<T, E>>> as Try>::Output
) -> Poll<Option<Result<T, E>>>
[src]try_trait_v2
)Constructs the type from its Output
type. Read more
pub fn branch(
self
) -> ControlFlow<<Poll<Option<Result<T, E>>> as Try>::Residual, <Poll<Option<Result<T, E>>> as Try>::Output>
[src]
pub fn branch(
self
) -> ControlFlow<<Poll<Option<Result<T, E>>> as Try>::Residual, <Poll<Option<Result<T, E>>> as Try>::Output>
[src]try_trait_v2
)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<Result<T, E>>
[src]
impl<T, E> Try for Poll<Result<T, E>>
[src]type Output = Poll<T>
type Output = Poll<T>
try_trait_v2
)The type of the value produced by ?
when not short-circuiting.
type Residual = Result<Infallible, E>
type Residual = Result<Infallible, E>
try_trait_v2
)The type of the value passed to FromResidual::from_residual
as part of ?
when short-circuiting. Read more
pub fn from_output(c: <Poll<Result<T, E>> as Try>::Output) -> Poll<Result<T, E>>
[src]
pub fn from_output(c: <Poll<Result<T, E>> as Try>::Output) -> Poll<Result<T, E>>
[src]try_trait_v2
)Constructs the type from its Output
type. Read more
pub fn branch(
self
) -> ControlFlow<<Poll<Result<T, E>> as Try>::Residual, <Poll<Result<T, E>> as Try>::Output>
[src]
pub fn branch(
self
) -> ControlFlow<<Poll<Result<T, E>> as Try>::Residual, <Poll<Result<T, E>> as Try>::Output>
[src]try_trait_v2
)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 for Poll<T> where
T: Copy,
[src]
T: Copy,
impl<T> Eq for Poll<T> where
T: Eq,
[src]
T: Eq,
impl<T> StructuralEq for Poll<T>
[src]
impl<T> StructuralPartialEq for Poll<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Poll<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
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,
impl<T> UnwindSafe for Poll<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more