Struct mqtt::control::variable_header::ProtocolName [−][src]
pub struct ProtocolName(pub String);
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'
+--------------------------+--------------------------+
Trait Implementations
impl Debug for ProtocolName
[src]
impl Debug for ProtocolName
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for ProtocolName
[src]
impl Eq for ProtocolName
impl PartialEq for ProtocolName
[src]
impl PartialEq for ProtocolName
fn eq(&self, other: &ProtocolName) -> bool
[src]
fn eq(&self, other: &ProtocolName) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ProtocolName) -> bool
[src]
fn ne(&self, other: &ProtocolName) -> bool
This method tests for !=
.
impl Clone for ProtocolName
[src]
impl Clone for ProtocolName
fn clone(&self) -> ProtocolName
[src]
fn clone(&self) -> ProtocolName
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Encodable for ProtocolName
[src]
impl Encodable for ProtocolName
type Err = VariableHeaderError
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), VariableHeaderError>
[src]
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), VariableHeaderError>
Encodes to writer
fn encoded_length(&self) -> u32
[src]
fn encoded_length(&self) -> u32
Length of bytes after encoded
impl Decodable for ProtocolName
[src]
impl Decodable for ProtocolName
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolName, VariableHeaderError>
[src]
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolName, VariableHeaderError>
Decodes object with additional data (or hints)
fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Err>
[src]
fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Err>
Decodes object from reader
Auto Trait Implementations
impl Send for ProtocolName
impl Send for ProtocolName
impl Sync for ProtocolName
impl Sync for ProtocolName