pub enum Error {
Paho(i32),
PahoDescr(i32, String),
Publish(i32, Message),
ReasonCode(ReasonCode),
BadTopicFilter,
Io(Error),
Utf8(Utf8Error),
Nul(NulError),
Conversion,
Timeout,
General(&'static str),
GeneralString(String),
}
Expand description
The errors from an MQTT operation.
Variants
Paho(i32)
An error from the underlying Paho C library. These are brought out as individual constants, below.
PahoDescr(i32, String)
An error from the Paho C library with an additional description.
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
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
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more