pub trait MessageInterceptor:
Send
+ Sync
+ Debug {
// Required methods
fn before_process<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<(), RuleError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn after_process<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<(), RuleError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
消息拦截器特征,用于在消息处理的不同阶段进行拦截处理