Trait NotifyCancel

Source
pub trait NotifyCancel {
    // Required methods
    fn wait_until_cancelled<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_cancelled(&self) -> bool;
}

Required Methods§

Source

fn wait_until_cancelled<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn is_cancelled(&self) -> bool

Implementations on Foreign Types§

Source§

impl NotifyCancel for StateWatcher

Source§

fn wait_until_cancelled<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn is_cancelled(&self) -> bool

Source§

impl NotifyCancel for CancellationToken

Source§

fn wait_until_cancelled<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn is_cancelled(&self) -> bool

Implementors§