pub enum EventBusError {
HandlerFailed {
event_type: String,
event_id: String,
message: String,
},
NoHandlers {
event_type: String,
},
SubscriptionFailed {
message: String,
},
Other {
message: String,
},
}Expand description
Errors that can occur during event bus operations.
Variants§
HandlerFailed
Handler execution failed
NoHandlers
No handlers registered for event type
SubscriptionFailed
Handler subscription failed
Other
General event bus error
Implementations§
Source§impl EventBusError
impl EventBusError
Sourcepub fn handler_failed(
event_type: impl Into<String>,
event_id: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn handler_failed( event_type: impl Into<String>, event_id: impl Into<String>, message: impl Into<String>, ) -> Self
Create a handler failed error.
Sourcepub fn no_handlers(event_type: impl Into<String>) -> Self
pub fn no_handlers(event_type: impl Into<String>) -> Self
Create a no handlers error.
Sourcepub fn subscription_failed(message: impl Into<String>) -> Self
pub fn subscription_failed(message: impl Into<String>) -> Self
Create a subscription failed error.
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