Enum CongestionControlState
#[repr(u32)]pub enum CongestionControlState {
Open = 0,
Disorder = 1,
CongestionWindowReduced = 2,
Recovery = 3,
Loss = 4,
}
Expand description
TCP congestion control state machine state.
Variants§
Open = 0
No indication of duplicate ACKs or loss. Everything is fine.
Disorder = 1
Received SACK blocks duplicate ACKs, assumed to be due to packet loss or reordering.
CongestionWindowReduced = 2
Sending rate reduced due to congestion signal. This is either an ECN or local queue overrun.
Recovery = 3
Sender has entered either fast recovery (after seeing enough duplicate ACKs) or SACK-based recovery
Loss = 4
Sender hit RTO and entered slow start. Exits when all retransmitted packets have been ACKed.
Implementations§
§impl CongestionControlState
impl CongestionControlState
pub fn from_primitive(prim: u32) -> Option<CongestionControlState>
pub const fn into_primitive(self) -> u32
Trait Implementations§
§impl Clone for CongestionControlState
impl Clone for CongestionControlState
§fn clone(&self) -> CongestionControlState
fn clone(&self) -> CongestionControlState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for CongestionControlState
impl Debug for CongestionControlState
§impl<D> Decode<CongestionControlState, D> for CongestionControlStatewhere
D: ResourceDialect,
impl<D> Decode<CongestionControlState, D> for CongestionControlStatewhere
D: ResourceDialect,
§fn new_empty() -> CongestionControlState
fn new_empty() -> CongestionControlState
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<CongestionControlState, D> for CongestionControlStatewhere
D: ResourceDialect,
impl<D> Encode<CongestionControlState, D> for CongestionControlStatewhere
D: ResourceDialect,
§impl Hash for CongestionControlState
impl Hash for CongestionControlState
§impl Ord for CongestionControlState
impl Ord for CongestionControlState
§fn cmp(&self, other: &CongestionControlState) -> Ordering
fn cmp(&self, other: &CongestionControlState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for CongestionControlState
impl PartialEq for CongestionControlState
§impl PartialOrd for CongestionControlState
impl PartialOrd for CongestionControlState
§impl TypeMarker for CongestionControlState
impl TypeMarker for CongestionControlState
§type Owned = CongestionControlState
type Owned = CongestionControlState
The owned Rust type which this FIDL type decodes into.
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for CongestionControlState
impl ValueTypeMarker for CongestionControlState
§type Borrowed<'a> = CongestionControlState
type Borrowed<'a> = CongestionControlState
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<CongestionControlState as TypeMarker>::Owned,
) -> <CongestionControlState as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<CongestionControlState as TypeMarker>::Owned, ) -> <CongestionControlState as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for CongestionControlState
impl Eq for CongestionControlState
impl StructuralPartialEq for CongestionControlState
Auto Trait Implementations§
impl Freeze for CongestionControlState
impl RefUnwindSafe for CongestionControlState
impl Send for CongestionControlState
impl Sync for CongestionControlState
impl Unpin for CongestionControlState
impl UnwindSafe for CongestionControlState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more