pub enum MaximumPacketSize {
Unlimited,
Limit(NonZero<u32>),
}Expand description
Maximum packet size. Exceeding this is a protocol error.
Variants§
Unlimited
There is no imposed limit on how large packets can be.
The technical limit is crate::types::VarByteInt::MAX_ENCODABLE + 5 (size of fixed header).
Limit(NonZero<u32>)
There is a limit on how large packets can be. The packet size is the value of its remaining length plus the size of the fixed header. A value of 0 is not allowed by the specification. A value less than 2 does not make sense because every MQTT packet contains a fixed header of at least 2 bytes.
Trait Implementations§
Source§impl Clone for MaximumPacketSize
impl Clone for MaximumPacketSize
Source§fn clone(&self) -> MaximumPacketSize
fn clone(&self) -> MaximumPacketSize
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 moreSource§impl Debug for MaximumPacketSize
impl Debug for MaximumPacketSize
Source§impl Default for MaximumPacketSize
impl Default for MaximumPacketSize
Source§fn default() -> MaximumPacketSize
fn default() -> MaximumPacketSize
Returns the “default value” for a type. Read more
Source§impl PartialEq for MaximumPacketSize
impl PartialEq for MaximumPacketSize
impl Copy for MaximumPacketSize
impl Eq for MaximumPacketSize
impl StructuralPartialEq for MaximumPacketSize
Auto Trait Implementations§
impl Freeze for MaximumPacketSize
impl RefUnwindSafe for MaximumPacketSize
impl Send for MaximumPacketSize
impl Sync for MaximumPacketSize
impl Unpin for MaximumPacketSize
impl UnsafeUnpin for MaximumPacketSize
impl UnwindSafe for MaximumPacketSize
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