pub enum Ecn {
NotEct,
Ect1,
Ect0,
Ce,
}Expand description
Variants§
NotEct
Not ECN-Capable Transport — routers may drop the packet on congestion.
Ect1
ECN-Capable Transport, codepoint 1.
Ect0
ECN-Capable Transport, codepoint 0.
Ce
Congestion Experienced — set by a router on an ECT-marked packet.
Implementations§
Source§impl Ecn
impl Ecn
Sourcepub fn to_tos_bits(self) -> u8
pub fn to_tos_bits(self) -> u8
Encode the ECN codepoint as the low 2 bits of a TOS/Traffic Class byte.
Sourcepub fn from_tos_bits(tos: u8) -> Self
pub fn from_tos_bits(tos: u8) -> Self
Decode the ECN codepoint from the low 2 bits of a TOS/Traffic Class byte.
Trait Implementations§
impl Copy for Ecn
impl Eq for Ecn
impl StructuralPartialEq for Ecn
Auto Trait Implementations§
impl Freeze for Ecn
impl RefUnwindSafe for Ecn
impl Send for Ecn
impl Sync for Ecn
impl Unpin for Ecn
impl UnsafeUnpin for Ecn
impl UnwindSafe for Ecn
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