Skip to main content

RuntimeHook

Trait RuntimeHook 

Source
pub trait RuntimeHook: Send + Sync {
    // Required method
    fn on_event<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        event: &'life1 RuntimeHookEventEnvelope,
        context: &'life2 RuntimeHookContext,
    ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn id(&self) -> &'static str { ... }
}

Required Methods§

Source

fn on_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, event: &'life1 RuntimeHookEventEnvelope, context: &'life2 RuntimeHookContext, ) -> Pin<Box<dyn Future<Output = Result<(), HookError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn id(&self) -> &'static str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§