Trait netem_trace::LossTrace
source · pub trait LossTrace {
// Required method
fn next_loss(&mut self) -> Option<(LossPattern, Duration)>;
}Expand description
This is a trait that represents a trace of loss patterns.
The trace is a sequence of (loss_pattern, duration) pairs.
The loss_pattern describes how packets are dropped when going through.
The duration is the time that the loss_pattern lasts.
The next_loss function either returns the next loss_pattern and its duration in the sequence, or None if the trace goes to end.