pub trait Process {
// Required method
fn process<Meta: PacketMetadata>(
&mut self,
meta: &Meta,
pkt: &Packet<'_>,
dir: PacketDirection,
);
}Expand description
A trait for types that can process a packet and update their state.
This is primarily used by Flow to update statistics (counters, timestamps)
and protocol-specific state machines (like TCP) upon receiving a new packet.
Required Methods§
Sourcefn process<Meta: PacketMetadata>(
&mut self,
meta: &Meta,
pkt: &Packet<'_>,
dir: PacketDirection,
)
fn process<Meta: PacketMetadata>( &mut self, meta: &Meta, pkt: &Packet<'_>, dir: PacketDirection, )
Update the state based on the provided packet metadata and content.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.