pub trait SessionParserFactory<K>: Send + 'static {
type Parser: SessionParser;
// Required method
fn new_parser(&mut self, key: &K) -> Self::Parser;
}Available on crate feature
session only.Expand description
Builds a fresh SessionParser per session. Modeled on
crate::ReassemblerFactory.
Most parsers can skip implementing this manually: any parser
that’s SessionParser + Default + Clone automatically becomes
a factory via the blanket impl below.
Required Associated Types§
type Parser: SessionParser
Required Methods§
fn new_parser(&mut self, key: &K) -> Self::Parser
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".