pub trait HeavyPdoTrace: Send {
// Required method
fn next_heavy_pdo(&mut self) -> Option<(Duration, u64)>;
}Expand description
This is a trait that represents a trace of heavy packet delivery opportunities (PDOs).
The trace is a sequence of (interval, bytes) pairs.
The interval is the time since the previous PDO (or since the start of the trace for the first one).
The bytes is how many bytes this PDO can deliver.
There is no concept of bandwidth here. For example, if the sequence is [(1ms, 1500), (0ms, 1500), (2ms, 3000)], then 3000 bytes can go out at 1ms and another 3000 bytes at 3ms.
A mahimahi trace (or the heavy PDO trace of CellReplay) can be loaded as a heavy PDO trace,
see load_mahimahi_heavy_pdo_trace (needs the mahimahi feature).
The next_heavy_pdo function either returns the next interval and its bytes in the sequence, or None if the trace goes to end.
Required Methods§
fn next_heavy_pdo(&mut self) -> Option<(Duration, u64)>
Trait Implementations§
Source§impl<Model: HeavyPdoTrace + 'static> From<Model> for Box<dyn HeavyPdoTrace>
impl<Model: HeavyPdoTrace + 'static> From<Model> for Box<dyn HeavyPdoTrace>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".