#[non_exhaustive]pub enum DispatchError {
BackendError {
name: String,
message: String,
},
UpstreamCancelled,
MissingDependency {
name: &'static str,
},
ChannelClosed,
}Expand description
Closed catalog of dispatcher errors. Adopter-reachable error
surfaces are NAMED (D7 mandate: zero unwrap() / zero
unimplemented!() / zero _ => catch-all). Each variant carries
adopter-actionable structured data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BackendError
Backend::stream() failed on a per-variant handler that
invoked it. Carries the backend name + the upstream error
message so the SSE handler can surface a structured
axon.error event.
UpstreamCancelled
Cancellation flag fired mid-dispatch (client disconnected or
upstream tokio::select! raced the cancel branch). Caller
MUST treat this as a clean exit (no axon.error event
surfaced — the consumer is already gone).
MissingDependency
A per-variant handler needed a dependency that wasn’t
available on the DispatchCtx (e.g., PEM async surface for a
Remember/Recall handler before 33.y.f wires it in). The
name field tags which dependency.
ChannelClosed
The mpsc sender returned Err(_) — consumer dropped. Caller
MUST treat this as a clean exit (same posture as
UpstreamCancelled).
Trait Implementations§
Source§impl Clone for DispatchError
impl Clone for DispatchError
Source§fn clone(&self) -> DispatchError
fn clone(&self) -> DispatchError
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 DispatchError
impl Debug for DispatchError
Source§impl Display for DispatchError
impl Display for DispatchError
Source§impl Error for DispatchError
impl Error for DispatchError
1.30.0 · 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()
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more