pub enum Congestion {
Cubic,
Bbr,
NewReno,
}Expand description
The congestion controller to install.
Deliberately not #[non_exhaustive]. tests/transport_exhaustive.rs
compiles as its own crate and matches this enum with no _ arm, which is
legal only while the attribute is absent; the attribute would force the
wildcard in, and after that a fourth controller compiles green out there
with nobody told it is unhandled. What the test can check is that every
variant named here is matchable, constructible and installable by a
downstream consumer, so adding one is a visible break rather than a
silent widening. What no test can check is the other direction: whether
quinn has grown a controller this list has never heard of. That stays a
reading of quinn’s congestion module whenever the dependency moves.
Variants§
Cubic
CUBIC, quinn’s default: loss-based, and the controller most of the internet is running.
Bbr
BBR: rate-based, and the interesting one against an impaired path, because it keeps sending through loss that collapses a loss-based sender.
NewReno
NewReno: the textbook loss-based controller, useful as a slow, predictable baseline.
Implementations§
Source§impl Congestion
impl Congestion
Sourcefn factory(self) -> Arc<dyn ControllerFactory + Send + Sync + 'static> ⓘ
fn factory(self) -> Arc<dyn ControllerFactory + Send + Sync + 'static> ⓘ
The factory quinn wants, boxed as the trait object its setter takes.
Each variant carries that controller’s own default configuration. Exposing the individual controller knobs would be a second configuration surface with its own validation, and none of it is serializable.
Trait Implementations§
Source§impl Clone for Congestion
impl Clone for Congestion
Source§fn clone(&self) -> Congestion
fn clone(&self) -> Congestion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more