Struct mqtt::control::variable_header::protocol_level::ProtocolLevel
[−]
[src]
pub struct ProtocolLevel(pub u8);
Protocol level in MQTT (0x04 in v3.1.1)
Trait Implementations
impl Debug for ProtocolLevel[src]
impl Eq for ProtocolLevel[src]
impl PartialEq for ProtocolLevel[src]
fn eq(&self, __arg_0: &ProtocolLevel) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ProtocolLevel) -> bool[src]
This method tests for !=.
impl Copy for ProtocolLevel[src]
impl Clone for ProtocolLevel[src]
fn clone(&self) -> ProtocolLevel[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<'a> Encodable<'a> for ProtocolLevel[src]
type Err = VariableHeaderError
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), VariableHeaderError>[src]
Encodes to writer
fn encoded_length(&self) -> u32[src]
Length of bytes after encoded
impl<'a> Decodable<'a> for ProtocolLevel[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolLevel, VariableHeaderError>[src]
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolLevel, VariableHeaderError>
Decodes object with additional data (or hints)
fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Err>[src]
Decodes object from reader