pub enum EventBusError {
Stopped,
ShutdownTimeout,
InvalidConfig(ConfigError),
MiddlewareRejected(String),
MissingDependency(String),
}Expand description
Errors returned by EventBus publish and shutdown
operations.
Variants§
Stopped
The bus has been shut down.
Returned by all publish, subscribe, unsubscribe, and stats calls made
after EventBus::shutdown has been
invoked.
ShutdownTimeout
Shutdown timed out before all in-flight async tasks completed.
Remaining tasks were aborted. Returned by
EventBus::shutdown when a
shutdown_timeout was
configured and elapsed.
InvalidConfig(ConfigError)
The builder configuration is invalid.
MiddlewareRejected(String)
A middleware rejected the event before it reached any listener.
MissingDependency(String)
A required dependency was not found in the Deps container.
The contained string is the fully-qualified type name of the missing dependency, suitable for diagnostic messages.
Returned by Deps::get_required and by
EventBusBuilder::build when a
registered handler cannot resolve one of its dependencies.
Trait Implementations§
Source§impl Clone for EventBusError
impl Clone for EventBusError
Source§fn clone(&self) -> EventBusError
fn clone(&self) -> EventBusError
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 EventBusError
impl Debug for EventBusError
Source§impl Display for EventBusError
impl Display for EventBusError
impl Eq for EventBusError
Source§impl Error for EventBusError
impl Error for EventBusError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ConfigError> for EventBusError
impl From<ConfigError> for EventBusError
Source§fn from(err: ConfigError) -> Self
fn from(err: ConfigError) -> Self
Source§impl PartialEq for EventBusError
impl PartialEq for EventBusError
Source§fn eq(&self, other: &EventBusError) -> bool
fn eq(&self, other: &EventBusError) -> bool
self and other values to be equal, and is used by ==.