pub trait LogProcessor:
Send
+ Sync
+ Debug {
// Required method
fn process(&self, record: &Sqllog) -> bool;
// Provided method
fn process_with_meta(&self, record: &Sqllog) -> bool { ... }
}Expand description
记录处理器接口:实现此接口即可加入处理管线 返回 true 表示保留该记录,false 表示丢弃
Required Methods§
Provided Methods§
Sourcefn process_with_meta(&self, record: &Sqllog) -> bool
fn process_with_meta(&self, record: &Sqllog) -> bool
使用已解析的 Sqllog 字段运行过滤逻辑(parser 库提供物化后的字段(栈上数据))。
默认实现退化为 process()。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".