pub enum EventBusError {
PublishFailed {
event_name: &'static str,
reason: PublishErrorReason,
},
HandlerError {
event_name: String,
message: String,
},
TopicNotFound(String),
ChannelClosed {
event_name: String,
},
TransportError {
message: String,
},
DowncastFailed {
event_name: String,
},
}Expand description
Errors that can occur during event bus operations.
Variants§
PublishFailed
Failed to publish an event to the bus.
Fields
§
reason: PublishErrorReasonWhy the publish failed.
HandlerError
A subscriber handler returned an error.
Fields
TopicNotFound(String)
The requested topic was not found.
ChannelClosed
The broadcast channel has been closed.
TransportError
An error occurred in the underlying transport layer.
DowncastFailed
Failed to downcast a type-erased event back to its concrete type.
Trait Implementations§
Source§impl Debug for EventBusError
impl Debug for EventBusError
Source§impl Display for EventBusError
impl Display for EventBusError
Source§impl Error for EventBusError
impl Error for EventBusError
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 Freeze for EventBusError
impl RefUnwindSafe for EventBusError
impl Send for EventBusError
impl Sync for EventBusError
impl Unpin for EventBusError
impl UnsafeUnpin for EventBusError
impl UnwindSafe for EventBusError
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