[][src]Trait kyansel::FutureCancellable

pub trait FutureCancellable: Future {
    fn cancel_with<S>(self, stopper: S) -> Cancellable<Self, S>
    where
        S: Future,
        Self: Sized
, { ... } }

An extension trait for Future that provides the Cancellable combinator.

Users are not expected to implement this trait. All types that implement Future already implement FutureCancellable.

Provided methods

fn cancel_with<S>(self, stopper: S) -> Cancellable<Self, S> where
    S: Future,
    Self: Sized

Cancel this future if another one completes succesfully

Note that this function consumes the receiving future and returns a wrapped version of it

Examples

An example can be found in examples/usage.rs

Loading content...

Implementors

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

Loading content...