Enum futures::Poll
[−]
[src]
pub enum Poll<T, E> { NotReady, Ok(T), Err(E), }
Possible return values from the Future::poll
method.
Variants
NotReady
Indicates that the future is not ready yet, ask again later.
Ok(T)
Indicates that the future has completed successfully, and this value is what the future completed with.
Err(E)
Indicates that the future has failed, and this error is what the future failed with.
Methods
impl<T, E> Poll<T, E>
[src]
fn map<F, U>(self, f: F) -> Poll<U, E> where F: FnOnce(T) -> U
Change the success type of this Poll
value with the closure provided
fn map_err<F, U>(self, f: F) -> Poll<T, U> where F: FnOnce(E) -> U
Change the error type of this Poll
value with the closure provided
fn is_not_ready(&self) -> bool
Returns whether this is Poll::NotReady
fn is_ready(&self) -> bool
Returns whether this is either Poll::Ok
or Poll::Err
fn unwrap(self) -> Result<T, E>
Unwraps this Poll
into a Result
, panicking if it's not ready.
Trait Implementations
impl<T: PartialEq, E: PartialEq> PartialEq for Poll<T, E>
[src]
fn eq(&self, __arg_0: &Poll<T, E>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Poll<T, E>) -> bool
This method tests for !=
.
impl<T: Debug, E: Debug> Debug for Poll<T, E>
[src]
impl<T: Clone, E: Clone> Clone for Poll<T, E>
[src]
fn clone(&self) -> Poll<T, E>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more