struct ShapedStream {
side: ProxySide,
key: StreamKey,
stream_id: u64,
shaper: Arc<Scheduler>,
}Expand description
Which stream a shaped release is happening on, for the events it owes.
None at the two control call sites, and that None is what makes control
streams are never shaped structural rather than remembered: a control pipe
installs no scheduler on its queue and has nothing to report a shaping
decision against, so neither the decision nor its event can appear there.
Carries the stream’s own scheduler rather than reaching for the session’s current one. The two differ from the moment a profile is installed on the proxy while this stream is forwarding: this stream was classified, queued and paced by the scheduler recorded here, so a report about one of its units has to be labelled and deduplicated against that scheduler. Asking the session for its current shaper instead would name the report after whatever class sits at that index in the new profile — a correct number under a wrong label, which is the one failure the whole shaping surface is written to avoid.
Fields§
§side: ProxySide§key: StreamKey§stream_id: u64§shaper: Arc<Scheduler>The scheduler this stream runs under, for the life of the stream.
Trait Implementations§
Source§impl Clone for ShapedStream
impl Clone for ShapedStream
Source§fn clone(&self) -> ShapedStream
fn clone(&self) -> ShapedStream
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more