[][src]Crate mqttbytes

Structs

ConnAck

Acknowledgement to connect packet

Connect

Connection packet initiated by the client

ConnectProperties
Disconnect
FixedHeader

Packet type from a byte

LastWill

LastWill that broker forwards on behalf of the client

Login
PingReq
PingResp
PubAck

Acknowledgement to QoS1 publish

PubComp

Acknowledgement to QoS1 publish

PubRec

Acknowledgement to QoS1 publish

PubRel

Acknowledgement to QoS1 publish

Publish

Publish packet

SubAck

Acknowledgement to subscribe

Subscribe

Subscription packet

SubscribeFilter

Subscription filter

UnsubAck

Acknowledgement to unsubscribe

Unsubscribe

Unsubscribe packet

WillProperties

Enums

ConnectReturnCode

Return code in connack

Error

Error during serialization and deserialization

Packet

Encapsulates all MQTT packet types

PacketType

MQTT packet type

Protocol

Protocol type

PubAckReason

Return code in connack

PubCompReason

Return code in connack

PubRecReason

Return code in connack

PubRelReason

Return code in connack

QoS

Quality of service

RetainForwardRule
SubscribeReasonCode

Functions

check

Checks if the stream has enough bytes to frame a packet and returns fixed header only if a packet can be framed with existing bytes in the stream. The passed stream doesn't modify parent stream's cursor. If this function returned an error, next check on the same parent stream is forced start with cursor at 0 again (Iter is owned. Only Iter's cursor is changed internally)

has_wildcards

Checks if a topic or topic filter has wildcards

matches

Checks if topic matches a filter. topic and filter validation isn't done here.

qos

Maps a number to QoS

read

Reads a stream of bytes and extracts next MQTT packet out of it

valid_filter

Checks if the filter is valid

valid_topic

Checks if a topic is valid