Hook

Trait Hook 

Source
pub trait Hook<E: HookEventKind>: Send + Sync {
    // Required method
    fn call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        input: &'life1 mut E::Input,
    ) -> Pin<Box<dyn Future<Output = Result<E::Output, HookError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Hookイベントの処理を行うトレイト

各イベント種別は戻り値型が異なるため、HookEventKindを介して型を制約する。

Required Methods§

Source

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

Implementors§