[−][src]Struct mqtt_packet::Property
A Property consists of an Identifier which defines its usage and data type, followed by a value.
2.2.2.2 Property
A Property consists of an Identifier which defines its usage and data type, followed by a value. The Identifier is encoded as a Variable Byte Integer. A Control Packet which contains an Identifier which is not valid for its packet type, or contains a value not of the specified data type, is a Malformed Packet. If received, use a CONNACK or DISCONNECT packet with Reason Code 0x81 (Malformed Packet). There is no significance in the order of Properties with different Identifiers.
Fields
values: BTreeMap<Identifier, DataType>
Methods
impl Property
[src]
pub fn new<R: Read>(reader: &mut R) -> Result<Self, Error>
[src]
Parse property identifiers and values from a reader.
pub fn generate(&self) -> Result<Vec<u8>, Error>
[src]
Convert Property values into a byte vector.
Auto Trait Implementations
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
impl RefUnwindSafe for Property
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,