pub enum EventHandlerError {
Utf8(Utf8Error),
UnexpectedApplicationMessageTopic,
InvalidApplicationMessage,
UnexpectedApplicationMessage,
Overflow,
Closed,
SubscriptionGrantedBelowMaximumQos {
granted_qos: QualityOfService,
maximum_qos: QualityOfService,
},
PublishedMessageHadNoMatchingSubscribers,
NoSubscriptionExisted,
}Expand description
Errors produced when a ClientNoQueue event handler cannot handle a ClientReceivedEvent. These errors propagate to the user of the client, and so are likely to cause the client to be disconnected. Alternatively, an event handler can use another method to propagate an error if it does not wish for the client to be disconnected, for example logging a warning, or using another target for the error, for example if an event handler uses a channel to send valid events onwards, it could also have a channel for errors.
Variants§
Utf8(Utf8Error)
Application Message payload contained invalid utf8 data, when a utf8 string was expected
UnexpectedApplicationMessageTopic
The topic of an application message is not expected, for example it doesn’t match our expected subscriptions
InvalidApplicationMessage
The contents of an application message are invalid for the handler, and can’t be parsed. For example if a json string is expected, and invalid json is received, or if the json received does not match the expected schema.
UnexpectedApplicationMessage
The contents of an application message can be parsed, but are unexpected, e.g. if they are received out of sequence
Overflow
A valid, expected event was received, but could not be handled due to an overflow. For example if the messages are sent onwards to a channel, and that channel is at capacity.
Closed
A valid, expected event was received, but could not be handled due to the destination for events being closed. For example if the messages are sent onwards to a channel, and that channel is closed.
SubscriptionGrantedBelowMaximumQos
The corresponding ClientReceivedEvent was received, and is an error for this event handler
PublishedMessageHadNoMatchingSubscribers
The corresponding ClientReceivedEvent was received, and is an error for this event handler
NoSubscriptionExisted
The corresponding ClientReceivedEvent was received, and is an error for this event handler
Trait Implementations§
Source§impl Clone for EventHandlerError
impl Clone for EventHandlerError
Source§fn clone(&self) -> EventHandlerError
fn clone(&self) -> EventHandlerError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventHandlerError
impl Debug for EventHandlerError
Source§impl Display for EventHandlerError
impl Display for EventHandlerError
Source§impl Format for EventHandlerError
Available on crate feature defmt only.
impl Format for EventHandlerError
defmt only.Source§impl From<EventHandlerError> for ClientError
impl From<EventHandlerError> for ClientError
Source§fn from(value: EventHandlerError) -> Self
fn from(value: EventHandlerError) -> Self
Source§impl From<Utf8Error> for EventHandlerError
impl From<Utf8Error> for EventHandlerError
Source§impl PartialEq for EventHandlerError
impl PartialEq for EventHandlerError
Source§fn eq(&self, other: &EventHandlerError) -> bool
fn eq(&self, other: &EventHandlerError) -> bool
self and other values to be equal, and is used by ==.