Enum Error
pub enum Error {
Endpoint,
ThingName,
Certificate,
PrivateKey,
Ca,
EmptySubscriber,
ConnectionError(Arc<ConnectionError>),
Mqtt(Arc<ClientError>),
Receive(RecvError),
}Expand description
An error that can occur when using the Beluga MQTT client.
This enum represents the various errors that can occur when working with the Beluga MQTT client. It includes errors related to missing configuration, connection issues, and MQTT-specific errors.
Variants§
Endpoint
The MQTT endpoint is missing.
ThingName
The thing name is missing.
Certificate
The certificate is missing.
PrivateKey
The private key is missing.
Ca
The certificate authority (CA) is missing.
EmptySubscriber
The subscriber doesn’t contain any receivers.
ConnectionError(Arc<ConnectionError>)
An error occurred while connecting to the MQTT broker.
Mqtt(Arc<ClientError>)
An error occurred while interacting with the MQTT client.
Receive(RecvError)
An error occurred while receiving data from the MQTT broker.
Trait Implementations§
§impl Error for Error
impl Error for Error
§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()
§impl From<ClientError> for Error
impl From<ClientError> for Error
§fn from(value: ClientError) -> Self
fn from(value: ClientError) -> Self
Converts to this type from the input type.
§impl From<ConnectionError> for Error
impl From<ConnectionError> for Error
§fn from(value: ConnectionError) -> Self
fn from(value: ConnectionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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