pub trait Plugin: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn stages(&self) -> Vec<ExecutionStage>;
fn intercept(&self, context: &mut PluginContext) -> PluginDecision;
}Expand description
Plugin 拦截器 trait
Required Methods§
Sourcefn stages(&self) -> Vec<ExecutionStage>
fn stages(&self) -> Vec<ExecutionStage>
拦截哪些阶段
Sourcefn intercept(&self, context: &mut PluginContext) -> PluginDecision
fn intercept(&self, context: &mut PluginContext) -> PluginDecision
拦截处理
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".