Skip to main content

AsyncHook

Trait AsyncHook 

Source
pub trait AsyncHook: Send + Sync {
    // Required method
    fn call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 mut PluginContext,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

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

Implementors§

Source§

impl<F> AsyncHook for FnHook<F>
where F: Fn(&mut PluginContext) -> Result<()> + Send + Sync,