pub struct MaxSegments(/* private fields */);Expand description
The max-segments-accepted field of a Confirmed-Request (Clause 20.1.2.4): three bits naming 2, 4, 8, 16, 32 or 64 segments, more than 64, or an unspecified number.
Implementations§
Source§impl MaxSegments
impl MaxSegments
Sourcepub const UNSPECIFIED: Self
pub const UNSPECIFIED: Self
B’000’: the number of segments is unspecified.
Sourcepub const MORE_THAN_64: Self
pub const MORE_THAN_64: Self
B’111’: more than 64 segments.
Sourcepub const fn from_capacity(capacity: Option<u8>) -> Option<Self>
pub const fn from_capacity(capacity: Option<u8>) -> Option<Self>
The field for a configured capacity: unspecified for None, and a
count rounded down to the largest one the field names, so it never
promises more than configured (65 and up are “more than 64”). None
for a capacity of 0 or 1 segments, which the field can’t express:
decline segmented replies instead.
Trait Implementations§
Source§impl Clone for MaxSegments
impl Clone for MaxSegments
impl Copy for MaxSegments
Source§impl Debug for MaxSegments
impl Debug for MaxSegments
impl Eq for MaxSegments
Source§impl Hash for MaxSegments
impl Hash for MaxSegments
Source§impl PartialEq for MaxSegments
impl PartialEq for MaxSegments
impl StructuralPartialEq for MaxSegments
Auto Trait Implementations§
impl Freeze for MaxSegments
impl RefUnwindSafe for MaxSegments
impl Send for MaxSegments
impl Sync for MaxSegments
impl Unpin for MaxSegments
impl UnsafeUnpin for MaxSegments
impl UnwindSafe for MaxSegments
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