pub enum RouteError {
SchemaVersionMismatch {
expected: String,
found: String,
},
EmptySentinel {
field: &'static str,
},
UnknownEventName {
received: String,
},
UnknownEnumName {
field: &'static str,
received: String,
},
InvalidFrameContext {
detail: String,
},
InvalidPayloadRef {
index: usize,
detail: String,
},
InvalidEventEnvelope {
detail: String,
},
AdapterIdNotFound {
adapter_id: String,
},
AdapterVersionMismatch {
adapter_id: String,
requested: String,
registered: String,
},
}Expand description
Reasons the router refused a crate::CallbackRequest before dispatch.
Variants are intentionally fine-grained: each acceptance-criterion
failure class gets its own variant so a future
super::FailureMapper can map them onto distinct
crate::FailureClass values without inspecting strings.
Variants§
SchemaVersionMismatch
schema_version on the inbound request did not match the
router’s compiled-in crate::SCHEMA_VERSION.
EmptySentinel
A required identifier was the empty sentinel string. Carries the field path for diagnostics.
UnknownEventName
The deserialized request carried an event-kind value that is not part of the wire vocabulary.
In practice serde rejects unknown enum wire names at deserialize time, but the variant exists so non-serde call sites (e.g. a future text-protocol bridge) can surface the same failure class without inventing a parallel error type.
UnknownEnumName
The deserialized request carried an enum value other than the
event kind (e.g. integration_mode) whose wire name is not in
the vocabulary. Preserved as a separate variant from
Self::UnknownEventName so the failure class is unambiguous
when mapping to a receipt.
InvalidFrameContext
frame_context violated a structural invariant: required for
the event but absent, or partially populated (e.g.
parent_frame_id without frame_id, or any frame field set
without frame_class).
InvalidPayloadRef
A payload reference failed structural validation (empty
payload_id / payload_kind). Body semantics are opaque
to the router — this only catches sentinel-empty fields on
the reference itself.
InvalidEventEnvelope
The request’s event is structurally illegal for this
envelope (e.g. receipt.emitted carrying an
idempotency_key). Distinct from frame-context errors so the
failure class is unambiguous.
AdapterIdNotFound
No registered adapter has an adapter_id matching the
request. Distinct from Self::AdapterVersionMismatch.
AdapterVersionMismatch
An adapter with the requested adapter_id is registered, but
its adapter_version does not match the request. Carries
both versions so a client can surface a precise upgrade
suggestion.
Trait Implementations§
Source§impl Clone for RouteError
impl Clone for RouteError
Source§fn clone(&self) -> RouteError
fn clone(&self) -> RouteError
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 RouteError
impl Debug for RouteError
Source§impl Display for RouteError
impl Display for RouteError
Source§impl Error for RouteError
impl Error for RouteError
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()
Source§impl From<&RouteError> for FailureClass
impl From<&RouteError> for FailureClass
Source§fn from(err: &RouteError) -> Self
fn from(err: &RouteError) -> Self
Source§impl PartialEq for RouteError
impl PartialEq for RouteError
Source§fn eq(&self, other: &RouteError) -> bool
fn eq(&self, other: &RouteError) -> bool
self and other values to be equal, and is used by ==.impl Eq for RouteError
impl StructuralPartialEq for RouteError
Auto Trait Implementations§
impl Freeze for RouteError
impl RefUnwindSafe for RouteError
impl Send for RouteError
impl Sync for RouteError
impl Unpin for RouteError
impl UnsafeUnpin for RouteError
impl UnwindSafe for RouteError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.