futures_signals

Function cancelable_future

Source
pub fn cancelable_future<A, B>(
    future: A,
    when_cancelled: B,
) -> (DiscardOnDrop<CancelableFutureHandle>, CancelableFuture<A, B>)
where A: Future, B: FnOnce() -> A::Output,