[][src]Enum kyansel::futures_01::CancellableError

pub enum CancellableError<C, E> {
    Cancelled(C),
    Errored(E),
}

Error returned by Cancellable

Variants

Cancelled(C)

If the inner future was cancelled

Errored(E)

If the inner future just errored

Methods

impl<C, E> CancellableError<C, E>[src]

pub fn is_cancelled(&self) -> bool[src]

Check if the future was cancelled

pub fn errored(self) -> Option<E>[src]

Retrieve the error of the future if it was not cancelled and it errored

pub fn cancelled(self) -> Option<C>[src]

Retrieve the result of the canceller future if the future was cancelled

Trait Implementations

impl<C: Clone, E: Clone> Clone for CancellableError<C, E>[src]

impl<C: Copy, E: Copy> Copy for CancellableError<C, E>[src]

impl<C: Eq, E: Eq> Eq for CancellableError<C, E>[src]

impl<C: PartialEq, E: PartialEq> PartialEq<CancellableError<C, E>> for CancellableError<C, E>[src]

impl<C: Debug, E: Debug> Debug for CancellableError<C, E>[src]

impl<C, E> StructuralPartialEq for CancellableError<C, E>[src]

impl<C, E> StructuralEq for CancellableError<C, E>[src]

Auto Trait Implementations

impl<C, E> Send for CancellableError<C, E> where
    C: Send,
    E: Send

impl<C, E> Sync for CancellableError<C, E> where
    C: Sync,
    E: Sync

impl<C, E> Unpin for CancellableError<C, E> where
    C: Unpin,
    E: Unpin

impl<C, E> UnwindSafe for CancellableError<C, E> where
    C: UnwindSafe,
    E: UnwindSafe

impl<C, E> RefUnwindSafe for CancellableError<C, E> where
    C: RefUnwindSafe,
    E: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]