Enum mqtt::control::variable_header::protocol_level::ProtocolLevel
source · #[repr(u8)]pub enum ProtocolLevel {
Version310 = 3,
Version311 = 4,
Version50 = 5,
}
Expand description
Protocol level in MQTT (0x04
in v3.1.1)
Variants§
Implementations§
source§impl ProtocolLevel
impl ProtocolLevel
pub fn from_u8(n: u8) -> Option<ProtocolLevel>
Trait Implementations§
source§impl Clone for ProtocolLevel
impl Clone for ProtocolLevel
source§fn clone(&self) -> ProtocolLevel
fn clone(&self) -> ProtocolLevel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProtocolLevel
impl Debug for ProtocolLevel
source§impl Decodable for ProtocolLevel
impl Decodable for ProtocolLevel
type Error = VariableHeaderError
type Cond = ()
source§fn decode_with<R: Read>(
reader: &mut R,
_rest: ()
) -> Result<ProtocolLevel, VariableHeaderError>
fn decode_with<R: Read>( reader: &mut R, _rest: () ) -> Result<ProtocolLevel, VariableHeaderError>
Decodes object with additional data (or hints)
source§impl Encodable for ProtocolLevel
impl Encodable for ProtocolLevel
source§impl PartialEq for ProtocolLevel
impl PartialEq for ProtocolLevel
source§fn eq(&self, other: &ProtocolLevel) -> bool
fn eq(&self, other: &ProtocolLevel) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ProtocolLevel
impl Eq for ProtocolLevel
impl StructuralPartialEq for ProtocolLevel
Auto Trait Implementations§
impl Freeze for ProtocolLevel
impl RefUnwindSafe for ProtocolLevel
impl Send for ProtocolLevel
impl Sync for ProtocolLevel
impl Unpin for ProtocolLevel
impl UnwindSafe for ProtocolLevel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more