pub trait PktHandler {
    // Required method
    fn handle_pkt(
        &mut self,
        pkt: &dyn NetPkt,
        lk: &Linkspace
    ) -> ControlFlow<()>;

    // Provided method
    fn stopped(
        &mut self,
        _: Query,
        _: &Linkspace,
        _: StopReason,
        _total_calls: u32,
        _watch_calls: u32
    ) { ... }
}
Expand description

Callbacks stored in a Linkspace instance. use cb and try_cb to impl from a single function.

Required Methods§

source

fn handle_pkt(&mut self, pkt: &dyn NetPkt, lk: &Linkspace) -> ControlFlow<()>

Handles an event.

Provided Methods§

source

fn stopped( &mut self, _: Query, _: &Linkspace, _: StopReason, _total_calls: u32, _watch_calls: u32 )

Called when break, finished, or replaced

Trait Implementations§

source§

impl PktHandler for Box<dyn PktHandler>

source§

fn handle_pkt(&mut self, pkt: &dyn NetPkt, lk: &Linkspace) -> ControlFlow<()>

Handles an event.
source§

fn stopped( &mut self, query: Query, lk: &Linkspace, reason: StopReason, total: u32, new: u32 )

Called when break, finished, or replaced

Implementations on Foreign Types§

source§

impl PktHandler for Box<dyn PktHandler>

source§

fn handle_pkt(&mut self, pkt: &dyn NetPkt, lk: &Linkspace) -> ControlFlow<()>

source§

fn stopped( &mut self, query: Query, lk: &Linkspace, reason: StopReason, total: u32, new: u32 )

Implementors§