Disposable

Trait Disposable 

Source
pub trait Disposable: Send + Sync {
    // Required method
    fn dispose<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for objects that need cleanup when disposed

Required Methods§

Source

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

Called when the capability is being disposed

Implementors§