#[repr(u8)]pub enum ConnectReturnCode {
Success = 0,
UnacceptableProtocolVersion = 1,
IdentifierRejected = 2,
ServerUnavailable = 3,
BadAuthData = 4,
NotAuthorized = 5,
}Expand description
Represents the return codes for a connection attempt in the MQTT protocol.
The ConnectReturnCode enum is used in the ConnAck packet to indicate the result
of a client’s connection request.
Variants§
Success = 0
Connection Accepted
UnacceptableProtocolVersion = 1
The Server does not support the level of the MQTT protocol requested by the Client
IdentifierRejected = 2
The Client identifier is correct UTF-8 but not allowed by the Server
The Network Connection has been made but the MQTT service is unavailable
BadAuthData = 4
The data in the username or password is malformed
NotAuthorized = 5
The Client is not authorized to connect
Trait Implementations§
Source§impl Clone for ConnectReturnCode
impl Clone for ConnectReturnCode
Source§fn clone(&self) -> ConnectReturnCode
fn clone(&self) -> ConnectReturnCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectReturnCode
impl Debug for ConnectReturnCode
Source§impl From<ConnectReturnCode> for u8
impl From<ConnectReturnCode> for u8
Source§fn from(value: ConnectReturnCode) -> Self
fn from(value: ConnectReturnCode) -> Self
Converts a ConnectReturnCode into a u8 value.
Source§impl PartialEq for ConnectReturnCode
impl PartialEq for ConnectReturnCode
Source§impl TryFrom<u8> for ConnectReturnCode
impl TryFrom<u8> for ConnectReturnCode
impl Copy for ConnectReturnCode
impl Eq for ConnectReturnCode
impl StructuralPartialEq for ConnectReturnCode
Auto Trait Implementations§
impl Freeze for ConnectReturnCode
impl RefUnwindSafe for ConnectReturnCode
impl Send for ConnectReturnCode
impl Sync for ConnectReturnCode
impl Unpin for ConnectReturnCode
impl UnwindSafe for ConnectReturnCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more