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,
}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]pub fn map<U, F>(self, f: F) -> Poll<U> where
F: FnOnce(T) -> U, [src]
F: FnOnce(T) -> U,
Changes the ready value of this Poll with the closure provided.
pub const fn is_ready(&self) -> bool1.36.0 (const: 1.49.0)[src]
Returns true if this is Poll::Ready
pub const fn is_pending(&self) -> bool1.36.0 (const: 1.49.0)[src]
Returns true if this is Poll::Pending
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]pub fn map_ok<U, F>(self, f: F) -> Poll<Option<Result<U, E>>> where
F: FnOnce(T) -> U, 1.51.0[src]
F: FnOnce(T) -> U,
Changes the success value of this Poll with the closure provided.
pub fn map_err<U, F>(self, f: F) -> Poll<Option<Result<T, U>>> where
F: FnOnce(E) -> U, 1.51.0[src]
F: FnOnce(E) -> U,
Changes the error value of this Poll with the closure provided.
Trait Implementations
impl<T: Clone> Clone for Poll<T>[src]
impl<T: Clone> Clone for Poll<T>[src]fn clone(&self) -> Poll<T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T: PartialOrd> PartialOrd<Poll<T>> for Poll<T>[src]
impl<T: PartialOrd> PartialOrd<Poll<T>> for Poll<T>[src]impl<T> StructuralEq for Poll<T>[src]
impl<T> StructuralEq for Poll<T>[src]impl<T> StructuralPartialEq for Poll<T>[src]
impl<T> StructuralPartialEq for Poll<T>[src]impl<T, E> Try for Poll<Result<T, E>>[src]
impl<T, E> Try for Poll<Result<T, E>>[src]impl<T, E> Try for Poll<Option<Result<T, E>>>[src]
impl<T, E> Try for Poll<Option<Result<T, E>>>[src]