Process

Trait Process 

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl Process for ()

Source§

fn process<Meta: PacketMetadata>( &mut self, _meta: &Meta, _pkt: &Packet<'_>, _dir: PacketDirection, )

Implementors§

Source§

impl<A, T> Process for Flow<A, T>
where T: Process,