Enum mqtt::control::variable_header::ConnectReturnCode [−][src]
pub enum ConnectReturnCode { ConnectionAccepted, UnacceptableProtocolVersion, IdentifierRejected, ServiceUnavailable, BadUserNameOrPassword, NotAuthorized, Reserved(u8), }
Return code for CONNACK
packet
Variants
ConnectionAccepted
UnacceptableProtocolVersion
IdentifierRejected
BadUserNameOrPassword
NotAuthorized
Reserved(u8)
Methods
impl ConnectReturnCode
[src]
impl ConnectReturnCode
pub fn to_u8(&self) -> u8
[src]
pub fn to_u8(&self) -> u8
Get the code
pub fn from_u8(code: u8) -> ConnectReturnCode
[src]
pub fn from_u8(code: u8) -> ConnectReturnCode
Create ConnectReturnCode
from code
Trait Implementations
impl Debug for ConnectReturnCode
[src]
impl Debug for ConnectReturnCode
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 ConnectReturnCode
[src]
impl Eq for ConnectReturnCode
impl PartialEq for ConnectReturnCode
[src]
impl PartialEq for ConnectReturnCode
fn eq(&self, other: &ConnectReturnCode) -> bool
[src]
fn eq(&self, other: &ConnectReturnCode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ConnectReturnCode) -> bool
[src]
fn ne(&self, other: &ConnectReturnCode) -> bool
This method tests for !=
.
impl Copy for ConnectReturnCode
[src]
impl Copy for ConnectReturnCode
impl Clone for ConnectReturnCode
[src]
impl Clone for ConnectReturnCode
fn clone(&self) -> ConnectReturnCode
[src]
fn clone(&self) -> ConnectReturnCode
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 ConnectReturnCode
[src]
impl Encodable for ConnectReturnCode
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 ConnectReturnCode
[src]
impl Decodable for ConnectReturnCode
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectReturnCode, VariableHeaderError>
[src]
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectReturnCode, 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 ConnectReturnCode
impl Send for ConnectReturnCode
impl Sync for ConnectReturnCode
impl Sync for ConnectReturnCode