Skip to main content

Trackable

Trait Trackable 

Source
pub trait Trackable {
    type Subscribed: Subscribable<Tracked = Self>;

    // Required methods
    fn new(five_tuple: FiveTuple) -> Self;
    fn pre_match(&mut self, pdu: L4Pdu, session_id: Option<usize>);
    fn on_match(
        &mut self,
        session: Session,
        subscription: &Subscription<'_, Self::Subscribed>,
    );
    fn post_match(
        &mut self,
        pdu: L4Pdu,
        subscription: &Subscription<'_, Self::Subscribed>,
    );
    fn on_terminate(
        &mut self,
        subscription: &Subscription<'_, Self::Subscribed>,
    );
}
Expand description

Tracks subscribable types throughout the duration of a connection.

Required Associated Types§

Source

type Subscribed: Subscribable<Tracked = Self>

Required Methods§

Source

fn new(five_tuple: FiveTuple) -> Self

Create a new Trackable type to manage subscription data for the duration of the connection represented by five_tuple.

Source

fn pre_match(&mut self, pdu: L4Pdu, session_id: Option<usize>)

Update tracked subscription data prior to a full filter match.

Source

fn on_match( &mut self, session: Session, subscription: &Subscription<'_, Self::Subscribed>, )

Update tracked subscription data on a full filter match.

Source

fn post_match( &mut self, pdu: L4Pdu, subscription: &Subscription<'_, Self::Subscribed>, )

Update tracked subscription data after a full filter match.

Source

fn on_terminate(&mut self, subscription: &Subscription<'_, Self::Subscribed>)

Update tracked subscription data on connection termination.

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.

Implementors§