pub struct PacketLimits { /* private fields */ }Expand description
What one packet’s payload may cost.
Carried by the boundary conversions and by an open demux session.
Implementations§
Source§impl PacketLimits
impl PacketLimits
Sourcepub const fn new() -> Self
pub const fn new() -> Self
The default: DEFAULT_MAX_PACKET_BYTES.
Sourcepub const fn max_packet_bytes(&self) -> usize
pub const fn max_packet_bytes(&self) -> usize
Most bytes one packet’s payload may carry.
Sourcepub const fn with_max_packet_bytes(self, value: usize) -> Self
pub const fn with_max_packet_bytes(self, value: usize) -> Self
Sets the per-packet ceiling (consuming builder).
Sourcepub const fn set_max_packet_bytes(&mut self, value: usize) -> &mut Self
pub const fn set_max_packet_bytes(&mut self, value: usize) -> &mut Self
Sets the per-packet ceiling in place.
Trait Implementations§
Source§impl Clone for PacketLimits
impl Clone for PacketLimits
Source§fn clone(&self) -> PacketLimits
fn clone(&self) -> PacketLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PacketLimits
Source§impl Debug for PacketLimits
impl Debug for PacketLimits
Source§impl Default for PacketLimits
impl Default for PacketLimits
impl Eq for PacketLimits
Source§impl Hash for PacketLimits
impl Hash for PacketLimits
Source§impl PartialEq for PacketLimits
impl PartialEq for PacketLimits
impl StructuralPartialEq for PacketLimits
Auto Trait Implementations§
impl Freeze for PacketLimits
impl RefUnwindSafe for PacketLimits
impl Send for PacketLimits
impl Sync for PacketLimits
impl Unpin for PacketLimits
impl UnsafeUnpin for PacketLimits
impl UnwindSafe for PacketLimits
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