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]
impl ConnectReturnCodepub fn to_u8(&self) -> u8[src]
pub fn to_u8(&self) -> u8Get the code
pub fn from_u8(code: u8) -> ConnectReturnCode[src]
pub fn from_u8(code: u8) -> ConnectReturnCodeCreate ConnectReturnCode from code
Trait Implementations
impl Debug for ConnectReturnCode[src]
impl Debug for ConnectReturnCodefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for ConnectReturnCode[src]
impl Eq for ConnectReturnCodeimpl PartialEq for ConnectReturnCode[src]
impl PartialEq for ConnectReturnCodefn eq(&self, other: &ConnectReturnCode) -> bool[src]
fn eq(&self, other: &ConnectReturnCode) -> boolThis 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) -> boolThis method tests for !=.
impl Copy for ConnectReturnCode[src]
impl Copy for ConnectReturnCodeimpl Clone for ConnectReturnCode[src]
impl Clone for ConnectReturnCodefn clone(&self) -> ConnectReturnCode[src]
fn clone(&self) -> ConnectReturnCodeReturns 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 ConnectReturnCodetype 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) -> u32Length of bytes after encoded
impl Decodable for ConnectReturnCode[src]
impl Decodable for ConnectReturnCodetype 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 ConnectReturnCodeimpl Sync for ConnectReturnCode
impl Sync for ConnectReturnCode