#[repr(u8)]pub enum ConnectReturnCode {
Accepted = 0,
UnacceptableProtocolVersion = 1,
IdentifierRejected = 2,
ServerUnavailable = 3,
BadUserNameOrPassword = 4,
NotAuthorized = 5,
}
Expand description
Connect Return Code
This is the 2nd byte of the variable header of the CONNACK packet which indicates whether the server accepted the connection, and if not, contains some information about why it rejected the request.
These are defined in MQTT v3.x. In v5, these are replaced with reason codes which expand the number of reasons why the connection was rejected.
Variants§
Accepted = 0
The connection was 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
BadUserNameOrPassword = 4
The data in the user name 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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConnectReturnCode
impl Debug for ConnectReturnCode
Source§impl Display for ConnectReturnCode
impl Display for ConnectReturnCode
Source§impl Hash for ConnectReturnCode
impl Hash for ConnectReturnCode
Source§impl Ord for ConnectReturnCode
impl Ord for ConnectReturnCode
Source§fn cmp(&self, other: &ConnectReturnCode) -> Ordering
fn cmp(&self, other: &ConnectReturnCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConnectReturnCode
impl PartialEq for ConnectReturnCode
Source§impl PartialOrd for ConnectReturnCode
impl PartialOrd 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