pub trait Preprocessor: Send + Sync {
// Required methods
fn process(&mut self, data: &[u8]) -> (Vec<u8>, Vec<ParseError>);
fn fork(&self) -> Box<dyn Preprocessor>;
fn splitter(&self) -> Option<Box<dyn Splitter>>;
}Expand description
Trait for preprocessing raw data before parsing.
Required Methods§
Sourcefn fork(&self) -> Box<dyn Preprocessor>
fn fork(&self) -> Box<dyn Preprocessor>
Create a new preprocessor with the same configuration as self.
Used by multithreaded transport endpoints to create multiple parallel input pipelines.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".