Registry / serialization / mqttbytes

mqttbytes

JSON →
library0.6.0rscratesunverified

Serialization and deserialization of MQTT v4 and v5 packets.

# Cargo.toml [dependencies] mqttbytes = "0.6.0"
INSTALL
IMPORT
SIG · MQTTBYTES
M
mqttbytes
serializationrustv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Packet
use mqttbytes::Packet;

Parses an MQTT packet from raw bytes.

use mqttbytes::Packet; fn main() -> Result<(), Box<dyn std::error::Error>> { let bytes = vec![0x10, 0x0d, 0x00, 0x04, b't', b'e', b's', b't']; let packet = Packet::from_bytes(&bytes)?; println!("{:?}", packet); Ok(()) }
Debug
Known issues
gotchaFeature flags needed for MQTT v5 support.
fix
Enable the 'v5' feature in Cargo.toml: mqttbytes = { version = "0.6", features = ["v5"] }
affects: >=0.6.0
Upgrade
Version history
0.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
mqttbytes — cargo add mqttbytes · libregistry