Struct mqtt::control::variable_header::ProtocolName
source · [−]pub struct ProtocolName(pub String);
Expand description
Protocol name in variable header
Example
7 3 0
+--------------------------+--------------------------+
| Length MSB (0) |
| Length LSB (4) |
| 0100 | 1101 | 'M'
| 0101 | 0001 | 'Q'
| 0101 | 0100 | 'T'
| 0101 | 0100 | 'T'
+--------------------------+--------------------------+
Tuple Fields
0: String
Trait Implementations
sourceimpl Clone for ProtocolName
impl Clone for ProtocolName
sourcefn clone(&self) -> ProtocolName
fn clone(&self) -> ProtocolName
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 ProtocolName
impl Debug for ProtocolName
sourceimpl Decodable for ProtocolName
impl Decodable for ProtocolName
type Error = VariableHeaderError
type Cond = ()
sourcefn decode_with<R: Read>(
reader: &mut R,
_rest: ()
) -> Result<ProtocolName, VariableHeaderError>
fn decode_with<R: Read>(
reader: &mut R,
_rest: ()
) -> Result<ProtocolName, VariableHeaderError>
Decodes object with additional data (or hints)
sourceimpl Encodable for ProtocolName
impl Encodable for ProtocolName
sourceimpl PartialEq<ProtocolName> for ProtocolName
impl PartialEq<ProtocolName> for ProtocolName
sourcefn eq(&self, other: &ProtocolName) -> bool
fn eq(&self, other: &ProtocolName) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProtocolName) -> bool
fn ne(&self, other: &ProtocolName) -> bool
This method tests for !=
.
impl Eq for ProtocolName
impl StructuralEq for ProtocolName
impl StructuralPartialEq for ProtocolName
Auto Trait Implementations
impl RefUnwindSafe for ProtocolName
impl Send for ProtocolName
impl Sync for ProtocolName
impl Unpin for ProtocolName
impl UnwindSafe for ProtocolName
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