1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! # Decode Trait
//!
//! This module defines the `Decode` trait, which provides a common interface for decoding
//! MQTT packets from their raw representation (`RawPacket`).
//!
//! The `Decode` trait is implemented by types that can be decoded from a raw MQTT packet.
use RawPacket;
use crateError;
/// A trait for decoding MQTT packets from their raw representation.
///
/// Types that implement this trait can be decoded from a `RawPacket`. This is useful for
/// deserializing MQTT packets received over the network.