pub trait RwndTrace: Send {
// Required method
fn next_rwnd(&mut self) -> Option<(RwndDecision, Duration)>;
}Expand description
This is a trait that represents a trace of receive-window decisions over time.
The trace is a sequence of (rwnd_decision, duration) pairs. The decision
describes how the socket’s receive buffer, the application’s read behavior,
and/or the observed remaining window change at this step; the duration is
how long this configuration lasts before the next step applies.
For example, if the sequence is
[(set_rcv_buf=64KB, app_read=1KB, 1s), (rwnd_remaining=32KB, 2s)],
then the receive buffer is resized to 64KB and the app reads 1KB for 1s,
then the observed rwnd becomes 32KB for 2s.
Each next_rwnd call returns the next decision and its duration in the
sequence, or None when the trace is exhausted. Mirrors the shape of
BwTrace, DelayTrace, and LossTrace.
Required Methods§
fn next_rwnd(&mut self) -> Option<(RwndDecision, Duration)>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".