pub enum DispatchError {
UnknownAggregateType(String),
UnknownCommand,
Deserialization(Error),
Execution(Box<dyn Error + Send + Sync>),
Io(Error),
}Expand description
Errors that can occur when dispatching a command.
Produced by the dispatch layer (CommandBus or
process manager dispatch) when a command cannot be routed to or executed
by the target aggregate.
Variants§
UnknownAggregateType(String)
No dispatcher registered for the target aggregate type.
UnknownCommand
No route registered for the command type.
Returned by CommandBus::dispatch when
the command’s concrete type has not been registered via register::<A>().
Deserialization(Error)
The command JSON could not be deserialized into the target aggregate’s command type.
Execution(Box<dyn Error + Send + Sync>)
The target aggregate’s command handler rejected the command or an I/O error occurred during execution.
Io(Error)
An I/O error occurred during dispatch (e.g. directory creation).
Trait Implementations§
Source§impl Debug for DispatchError
impl Debug for DispatchError
Source§impl Display for DispatchError
impl Display for DispatchError
Source§impl Error for DispatchError
impl Error for DispatchError
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 DispatchError
impl !RefUnwindSafe for DispatchError
impl Send for DispatchError
impl Sync for DispatchError
impl Unpin for DispatchError
impl UnsafeUnpin for DispatchError
impl !UnwindSafe for DispatchError
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