pub trait PluginHook: Send + Sync {
// Provided methods
fn before_execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn after_execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
_result: &'life2 PluginResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
_error: &'life2 PluginError,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Plugin lifecycle hook
Provided Methods§
Sourcefn before_execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called before plugin execution
Sourcefn after_execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
_result: &'life2 PluginResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginContext,
_result: &'life2 PluginResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called after plugin execution