pub enum MqttError {
MalformedPacket(String),
Protocol(String),
Io(String),
ConnectionRefused(String),
NotConnected,
PacketTooLarge(String),
AlreadyConnected,
Timeout,
Session(String),
}Expand description
All errors that can be produced while encoding/decoding MQTT packets or
operating an MQTT client (stem-mqtt-client). The client crate exposes it to
foreign languages through UniFFI as a plain error enum.
Variants§
MalformedPacket(String)
The peer sent a packet that violates the MQTT specification.
Protocol(String)
A value could not be encoded/decoded per the wire protocol.
Io(String)
Underlying I/O failure (connection reset, DNS failure, etc.).
ConnectionRefused(String)
The broker rejected the connection attempt.
NotConnected
An operation was attempted while not connected to a broker.
PacketTooLarge(String)
A packet’s declared size exceeds the configured maximum packet size.
AlreadyConnected
The client is already connected.
Timeout
The peer did not acknowledge a QoS 1/2 packet before the timeout.
Session(String)
Generic keep-alive / session error.
Trait Implementations§
Source§impl Error for MqttError
impl Error for MqttError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Forget for MqttError
impl Freeze for MqttError
impl Move for MqttError
impl RefUnwindSafe for MqttError
impl Send for MqttError
impl Sync for MqttError
impl Unpin for MqttError
impl UnsafeUnpin for MqttError
impl UnwindSafe for MqttError
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