Enum mqtt::control::variable_header::ConnectReturnCode
[−]
[src]
pub enum ConnectReturnCode {
ConnectionAccepted,
UnacceptableProtocolVersion,
IdentifierRejected,
ServiceUnavailable,
BadUserNameOrPassword,
NotAuthorized,
Reserved(u8),
}Return code for CONNACK packet
Variants
ConnectionAcceptedUnacceptableProtocolVersionIdentifierRejectedBadUserNameOrPasswordNotAuthorizedReserved(u8)
Methods
impl ConnectReturnCode[src]
fn to_u8(&self) -> u8[src]
Get the code
fn from_u8(code: u8) -> ConnectReturnCode[src]
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[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ConnectReturnCode) -> bool[src]
This method tests for !=.
impl Copy for ConnectReturnCode[src]
impl Clone for ConnectReturnCode[src]
fn clone(&self) -> ConnectReturnCode[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
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>[src]
Encodes to writer
fn encoded_length(&self) -> u32[src]
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>[src]
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]
Decodes object from reader