pub trait Plugin: Send + Sync {
// Required method
fn name(&self) -> &'static str;
// Provided methods
fn on_before_run<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
) -> Pin<Box<dyn Future<Output = Result<Context>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_after_run<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
) -> Pin<Box<dyn Future<Output = HookNoopResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
Provided Methods§
fn on_before_run<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
) -> Pin<Box<dyn Future<Output = Result<Context>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_after_run<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
) -> Pin<Box<dyn Future<Output = HookNoopResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".