DelayPerPacketTrace

Trait DelayPerPacketTrace 

Source
pub trait DelayPerPacketTrace: Send {
    // Required method
    fn next_delay(&mut self) -> Option<Delay>;
}
Expand description

This is a trait that represents a trace of per-packet delays.

The trace is a sequence of delay. The delay describes how long the packet is delayed when going through.

For example, if the sequence is [10ms, 20ms, 30ms], then the delay will be 10ms for the first packet, then 20ms for second, then 30ms for third.

The next_delay function either returns the next delay in the sequence, or None if the trace goes to end.

Required Methods§

Source

fn next_delay(&mut self) -> Option<Delay>

Trait Implementations§

Source§

impl<Model: DelayPerPacketTrace + 'static> From<Model> for Box<dyn DelayPerPacketTrace>

Source§

fn from(model: Model) -> Self

Converts to this type from the input type.

Implementors§