[][src]Struct mqtt::control::fixed_header::FixedHeader

pub struct FixedHeader {
    pub packet_type: PacketType,
    pub remaining_length: u32,
}

Fixed header for each MQTT control packet

Format:

7                          3                          0
+--------------------------+--------------------------+
| MQTT Control Packet Type | Flags for each type      |
+--------------------------+--------------------------+
| Remaining Length ...                                |
+-----------------------------------------------------+

Fields

packet_type: PacketType

Packet Type

remaining_length: u32

The Remaining Length is the number of bytes remaining within the current packet, including data in the variable header and the payload. The Remaining Length does not include the bytes used to encode the Remaining Length.

Methods

impl FixedHeader[src]

pub fn new(packet_type: PacketType, remaining_length: u32) -> FixedHeader[src]

Trait Implementations

impl Clone for FixedHeader[src]

impl Copy for FixedHeader[src]

impl Debug for FixedHeader[src]

impl Decodable for FixedHeader[src]

type Err = FixedHeaderError

type Cond = ()

impl Encodable for FixedHeader[src]

type Err = FixedHeaderError

impl Eq for FixedHeader[src]

impl PartialEq<FixedHeader> for FixedHeader[src]

impl StructuralEq for FixedHeader[src]

impl StructuralPartialEq for FixedHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Decodable for T where
    T: 'static + Packet + Debug
[src]

type Err = PacketError<T>

type Cond = FixedHeader

impl<T> Encodable for T where
    T: 'static + Packet + Debug
[src]

type Err = PacketError<T>

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.