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

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

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]

Asynchronously parse a single fixed header from an AsyncRead type, such as a network socket.

Trait Implementations

impl Debug for FixedHeader
[src]

Formats the value using the given formatter. Read more

impl Clone for FixedHeader
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for FixedHeader
[src]

impl Eq for FixedHeader
[src]

impl PartialEq for FixedHeader
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Encodable for FixedHeader
[src]

Encodes to writer

Length of bytes after encoded

impl Decodable for FixedHeader
[src]

Decodes object with additional data (or hints)

Decodes object from reader

Auto Trait Implementations

impl Send for FixedHeader

impl Sync for FixedHeader