pub trait Process {
// Required method
fn process<Meta: PacketMetadata, T>(
&mut self,
meta: &Meta,
pkt: &Packet<'_>,
dir: PacketDirection,
base: &mut FlowBase<T>,
);
}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, T>(
&mut self,
meta: &Meta,
pkt: &Packet<'_>,
dir: PacketDirection,
base: &mut FlowBase<T>,
)
fn process<Meta: PacketMetadata, T>( &mut self, meta: &Meta, pkt: &Packet<'_>, dir: PacketDirection, base: &mut FlowBase<T>, )
Update the state based on the provided packet metadata and content.
§Arguments
meta- Packet metadata (timestamp, length, etc.)pkt- The parsed packetdir- Direction of the packet relative to the flowcore- Mutable reference to the flow’s core statistics and metadata
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.