Enum finchers_core::Poll
[−]
[src]
pub enum Poll<T> { Ready(T), Pending, }
An enum which indicates whether a value is ready or not.
Variants
Ready(T)
The task has just been finished with a returned value of T
.
Pending
The task is not ready and should be scheduled to be awoken by the executor.
Methods
impl<T> Poll<T>
[src]
pub fn is_pending(&self) -> bool
[src]
Return whether the value is Pending
.
pub fn is_ready(&self) -> bool
[src]
Return whether the value is Ready
.
pub fn map<F, U>(self, f: F) -> Poll<U> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
Maps the value to a new type with given function.
impl<T, E> Poll<Result<T, E>>
[src]
pub fn is_ok(&self) -> bool
[src]
Return whether the value is Ready(Ok(t))
.
pub fn is_err(&self) -> bool
[src]
Return whether the value is Ready(Err(t))
.
pub fn map_ok<F, U>(self, f: F) -> Poll<Result<U, E>> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
Maps the value to a new type with given function if the value is Ok
.
pub fn map_err<F, U>(self, f: F) -> Poll<Result<T, U>> where
F: FnOnce(E) -> U,
[src]
F: FnOnce(E) -> U,
Maps the value to a new type with given function if the value is Err
.
Trait Implementations
impl<T: Debug> Debug for Poll<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: Copy> Copy for Poll<T>
[src]
impl<T: Clone> Clone for Poll<T>
[src]
fn clone(&self) -> Poll<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for Poll<T>
[src]
fn eq(&self, __arg_0: &Poll<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Poll<T>) -> bool
[src]
This method tests for !=
.