[−][src]Crate mqtt4bytes
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 |
FixedHeader | Packet type from a byte |
LastWill | LastWill that broker forwards on behalf of the client |
Login | Username, password authentication |
PingReq | Ping request packet |
PingResp | Ping response packet |
PubAck | Acknowledgement to QoS1 publish |
PubComp | Acknowledgement to pubrel |
PubRec | Acknowledgement to QoS2 publish |
PubRel | Acknowledgement to pubrec |
Publish | Publish packet |
PublishRaw | Raw publish is used to perform serialization in current thread rather the eventloop. |
SubAck | Acknowledgement to subscribe |
Subscribe | Subscription packet |
SubscribeTopic | Subscription filter |
UnsubAck | Acknowledgement to unsubscribe |
Unsubscribe | Unsubscribe packet |
Enums
ConnectReturnCode | Return code in connack |
Error | Serialization/Deserialization errors |
Packet | Encapsulates all MQTT packet types |
PacketType | MQTT packet type |
Protocol | Protocol type |
QoS | Quality of service |
SubscribeReturnCodes | 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 |