pub trait PluginMiddleware: Send + Sync {
// Required methods
fn before_execution(
&self,
plugin_name: &str,
context: &PluginContext,
) -> Result<()>;
fn after_execution(
&self,
plugin_name: &str,
context: &PluginContext,
result: &PluginResult,
) -> Result<()>;
}Expand description
Plugin middleware trait for cross-cutting concerns
Required Methods§
Sourcefn before_execution(
&self,
plugin_name: &str,
context: &PluginContext,
) -> Result<()>
fn before_execution( &self, plugin_name: &str, context: &PluginContext, ) -> Result<()>
Execute before plugin operation
Sourcefn after_execution(
&self,
plugin_name: &str,
context: &PluginContext,
result: &PluginResult,
) -> Result<()>
fn after_execution( &self, plugin_name: &str, context: &PluginContext, result: &PluginResult, ) -> Result<()>
Execute after plugin operation