Struct tokio_mqttc::proto::MqttPacket [] [src]

pub struct MqttPacket {
    pub ty: PacketType,
    pub flags: PacketFlags,
    pub headers: Headers,
    pub payload: Payload,
}

Fields

Methods

impl MqttPacket
[src]

[src]

Attempts to decode a MQTT Control Packet from the provided slice of bytes.

If there is a fully formed packet in the slice, Ok(Some((MqttPacket, Vec<u8>))) will be returned, containing the formed packet and the rest of the slice.

If there is not enough bytes in the slice to create a fully formed packet, Ok(None) will be returned.

If an error occurs decoding the bytes, an error will be returned.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Clone for MqttPacket
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more