Trait ore::future::OreFutureExt[][src]

pub trait OreFutureExt {
    fn spawn_if_canceled<Name, NameClosure>(
        self,
        nc: NameClosure
    ) -> SpawnIfCanceled<Self::Output, Name, NameClosure>
Notable traits for SpawnIfCanceled<T, Name, NameClosure>
impl<T, Name, NameClosure> Future for SpawnIfCanceled<T, Name, NameClosure> where
    Name: AsRef<str>,
    NameClosure: FnOnce() -> Name + Unpin,
    T: Send + 'static, 
type Output = T;

    where
        Name: AsRef<str>,
        NameClosure: FnOnce() -> Name + Unpin,
        Self: Future + Send + 'static,
        Self::Output: Send + 'static
; }
This is supported on crate feature network only.
Expand description

Extension methods for futures.

Required methods

Wraps a future in a SpawnIfCanceled future, which will spawn a task to poll the inner future to completion if it is dropped.

Implementors