pub enum Error<E> {
StateTimeout(State),
Disconnect,
TcpTimeout,
Decode,
Protocol,
ConnAck(ConnectReasonCode),
OutOfMemory,
NotConnected,
ServerAlert(Alert),
ClientAlert(Alert),
Other(E),
}
Expand description
MQTT client errors.
When an error occurs the client state is reset to State::Init
.
The next call to Client::process
will create a new connection.
Variants§
StateTimeout(State)
A timeout occurred while waiting for the client to transition from this state.
Disconnect
Unexpected TCP disconnection.
TcpTimeout
TCP connection timeout.
Decode
A packet failed to decode.
For example, this can occur when the variable byte encoding in the fixed header is incorrect.
Protocol
Protocol Error
The packet encoding is correct, but an illegal value was used for one of the fields.
ConnAck(ConnectReasonCode)
The client was unable to connect with the server.
The next call to process
will re-connect.
OutOfMemory
Ran out of memory writing to the socket buffers.
NotConnected
Tried to publish, subscribe, or unsubscribe when not connected.
ServerAlert(Alert)
w5500-tls
only.Alert from the TLS server.
ClientAlert(Alert)
w5500-tls
only.Alert from the TLS client.
Other(E)
Errors from the Registers
trait implementation.