pub struct FixedHeader { /* private fields */ }Expand description
The fixed header of any MQTT Control Packet containing the packet type, flags and the remaining length.
Implementations§
Source§impl FixedHeader
impl FixedHeader
Sourcepub fn flags(&self) -> u8
pub fn flags(&self) -> u8
Returns the flags of the FixedHeader. These are the lower 4 bits of the first byte.
The type of the packet is masked away.
Sourcepub fn packet_type(&self) -> Result<PacketType, Reserved>
pub fn packet_type(&self) -> Result<PacketType, Reserved>
Trait Implementations§
Source§impl Clone for FixedHeader
impl Clone for FixedHeader
Source§fn clone(&self) -> FixedHeader
fn clone(&self) -> FixedHeader
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 FixedHeader
impl Debug for FixedHeader
Source§impl PartialEq for FixedHeader
impl PartialEq for FixedHeader
impl Copy for FixedHeader
impl Eq for FixedHeader
impl StructuralPartialEq for FixedHeader
Auto Trait Implementations§
impl Freeze for FixedHeader
impl RefUnwindSafe for FixedHeader
impl Send for FixedHeader
impl Sync for FixedHeader
impl Unpin for FixedHeader
impl UnsafeUnpin for FixedHeader
impl UnwindSafe for FixedHeader
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