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]
fn to_u8(&self) -> u8
Get the code
fn from_u8(code: u8) -> ConnectReturnCode
Create ConnectReturnCode
from code
Trait Implementations
impl Debug for ConnectReturnCode
[src]
impl Eq for ConnectReturnCode
[src]
impl PartialEq for ConnectReturnCode
[src]
fn eq(&self, __arg_0: &ConnectReturnCode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ConnectReturnCode) -> bool
This method tests for !=
.
impl Copy for ConnectReturnCode
[src]
impl Clone for ConnectReturnCode
[src]
fn clone(&self) -> ConnectReturnCode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> Encodable<'a> for ConnectReturnCode
[src]
type Err = VariableHeaderError
fn encode<W: Write>(&self, writer: &mut W) -> Result<(), VariableHeaderError>
Encodes to writer
fn encoded_length(&self) -> u32
Length of bytes after encoded
impl<'a> Decodable<'a> for ConnectReturnCode
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectReturnCode, VariableHeaderError>
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>
Decodes object from reader