Expand description
This is a low level (no_std) crate with the ability to assemble and disassemble MQTT 3.1.1 packets and is used by both client and broker. Uses ‘bytes’ crate internally
Structs§
- ConnAck
- Acknowledgement to connect packet
- Connect
- Connection packet initiated by the client
- Disconnect
- Disconnect packet
- Fixed
Header - Packet type from a byte
- Last
Will - LastWill that broker forwards on behalf of the client
- Login
- Username, password authentication
- PingReq
- Ping request packet
- Ping
Resp - Ping response packet
- PubAck
- Acknowledgement to QoS1 publish
- PubComp
- Acknowledgement to pubrel
- PubRec
- Acknowledgement to QoS2 publish
- PubRel
- Acknowledgement to pubrec
- Publish
- Publish packet
- Publish
Raw - Raw publish is used to perform serialization in current thread rather the eventloop.
- SubAck
- Acknowledgement to subscribe
- Subscribe
- Subscription packet
- Subscribe
Topic - Subscription filter
- Unsub
Ack - Acknowledgement to unsubscribe
- Unsubscribe
- Unsubscribe packet
Enums§
- Connect
Return Code - Return code in connack
- Error
- Serialization/Deserialization errors
- Packet
- Encapsulates all MQTT packet types
- Packet
Type - MQTT packet type
- Protocol
- Protocol type
- QoS
- Quality of service
- Subscribe
Return Codes - Subscription return code
Functions§
- check
- Checks if the stream has enough bytes to frame a packet and returns fixed header
- 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.
- mqtt_
read - Reads a stream of bytes and extracts MQTT packets
- qos
- Maps a number to QoS
- valid_
filter - Checks if the filter is valid
- valid_
topic - Checks if a topic is valid