pub enum Error {
Show 36 variants
Failure,
PersistenceError,
Disconnected,
MaxMessagesInflight,
BadUtf8String,
NullParameter,
TopicNameTruncated,
BadStructure,
BadQos,
NoMoreMsgIds,
OperationIncomplete,
MaxBufferedMessages,
SslNotSupported,
BadProtocol,
BadMqttOption,
WrongMqttVersion,
ZeroLenWillTopic,
CommandIgnored,
MaxBufferedZero,
TcpConnectTimeout,
TcpConnectCompletionFailure,
TcpTlsConnectFailure,
SocketError(i32),
ConnectReturn(ConnectReturnCode),
ReceivedDisconnect(i32),
Publish(i32, Message),
ReasonCode(ReasonCode),
BadTopicFilter,
Io(Error),
Utf8(Utf8Error),
Nul(NulError),
MissingSslOptions,
Conversion,
Timeout,
General(&'static str),
GeneralString(String),
}
Expand description
The errors from an MQTT operation.
Variants§
Failure
A generic error code indicating the failure of an MQTT client operation.
PersistenceError
Persistence error
Disconnected
The client is disconnected.
MaxMessagesInflight
The maximum number of messages allowed to be simultaneously in-flight has been reached.
BadUtf8String
An invalid UTF-8 string has been detected.
NullParameter
A NULL parameter has been supplied to the underlying C library when this is invalid.
TopicNameTruncated
The topic has been truncated (the topic string includes embedded NULL characters). String functions will not access the full topic. Use the topic length value to access the full topic.
BadStructure
A structure parameter passed down to the C library does not have the correct eyecatcher and version number.
BadQos
An invaid QoS value was used not 0, 1, or 2)
NoMoreMsgIds
All 64k MQTT message ID are currently in use
OperationIncomplete
The request is being discarded when not complete
MaxBufferedMessages
The limit on the maximum number of message buffers has been reached.
SslNotSupported
Attempting SSL connection using non-SSL version of library.
BadProtocol
A bad URL protocol/schema was requested/ Note that the TLS enabled prefixes (ssl, mqtts, wss) are only valid if the TLS version of the library is linked int the app.
BadMqttOption
Don’t use options for another version of MQTT
WrongMqttVersion
Call not applicable to the client’s version of MQTT
ZeroLenWillTopic
The LWT topic can not be zero length
CommandIgnored
Connect or disconnect command ignored because there is already a connect or disconnect command at the head of the list waiting to be processed. Use the onSuccess/onFailure callbacks to wait for the previous connect or disconnect command to be complete.
MaxBufferedZero
The max number of buffered messages can not be zero. The library needs at least one slot for the outbound message.
TcpConnectTimeout
The TCP connection timed out
TcpConnectCompletionFailure
The TCP connection failed to complete
TcpTlsConnectFailure
TCP/TLS connection failure
SocketError(i32)
A socket error occurred
ConnectReturn(ConnectReturnCode)
ReceivedDisconnect(i32)
Publish(i32, Message)
A synchronous error when publishing creating or queuing the message.
ReasonCode(ReasonCode)
An MQTT v5 error from a reason code.
BadTopicFilter
A bad topic filter
Io(Error)
An low-level I/O error
Utf8(Utf8Error)
An error parsing a UTF-8 string
Nul(NulError)
A string NUL error
MissingSslOptions
Missing SSL/TLS options
Conversion
Conversion error between types
Timeout
A timeout, particularly from a synchronous operation.
General(&'static str)
A general error with description
GeneralString(String)
A general error with description