pub enum EventBusError {
Stopped,
ChannelFull,
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.
ChannelFull
The internal channel buffer is full and no capacity is available.
Only returned by EventBus::try_publish.
Use EventBus::publish to wait for
available capacity instead.
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 · 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
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()