Enum tangle::Async [] [src]

pub enum Async<T, E> {
    Ok(T),
    Err(E),
    Continue(Future<T, E>),
}

Asynchronous version of Result<T, E> that allows for future composition. Additional macros are provided to work with both Async<T, E> and Result<T, E>.

Variants

Ok
Err
Continue

Methods

impl<T, E> Async<T, E>

fn unwrap(self) -> T

fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Async<U, E>

fn map_err<U, F: FnOnce(E) -> U>(self, f: F) -> Async<T, U>

fn is_err(&self) -> bool

fn is_future(&self) -> bool

fn is_ok(&self) -> bool

Trait Implementations

Derived Implementations

impl<T: Debug, E: Debug> Debug for Async<T, E>

fn fmt(&self, __arg_0: &mut Formatter) -> Result