Enum mqtt::control::variable_header::protocol_level::ProtocolLevel
source · [−]#[repr(u8)]
pub enum ProtocolLevel {
Version310,
Version311,
Version50,
}
Expand description
Protocol level in MQTT (0x04
in v3.1.1)
Variants
Version310
Version311
Version50
Implementations
sourceimpl ProtocolLevel
impl ProtocolLevel
pub fn from_u8(n: u8) -> Option<ProtocolLevel>
Trait Implementations
sourceimpl Clone for ProtocolLevel
impl Clone for ProtocolLevel
sourcefn clone(&self) -> ProtocolLevel
fn clone(&self) -> ProtocolLevel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ProtocolLevel
impl Debug for ProtocolLevel
sourceimpl Decodable for ProtocolLevel
impl Decodable for ProtocolLevel
type Error = VariableHeaderError
type Cond = ()
sourcefn 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)
sourceimpl Encodable for ProtocolLevel
impl Encodable for ProtocolLevel
sourceimpl PartialEq<ProtocolLevel> for ProtocolLevel
impl PartialEq<ProtocolLevel> for ProtocolLevel
impl Copy for ProtocolLevel
impl Eq for ProtocolLevel
impl StructuralEq for ProtocolLevel
impl StructuralPartialEq for ProtocolLevel
Auto Trait Implementations
impl RefUnwindSafe for ProtocolLevel
impl Send for ProtocolLevel
impl Sync for ProtocolLevel
impl Unpin for ProtocolLevel
impl UnwindSafe for ProtocolLevel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more