pub enum Error {
TooLarge {
max: usize,
len: usize,
},
Core(Error),
Envelope(Error),
Codec(CodecError),
UnsupportedCodec {
codec_id: u8,
},
SchemaMismatch {
expected: u64,
found: u64,
},
TypeMismatch {
expected: u32,
found: u32,
},
VersionMismatch {
expected: u16,
found: u16,
},
}Expand description
Typed-layer error.
This wraps and normalizes errors from:
indexbus-core(queue and routing semantics)indexbus-msg(v1 envelope/header)indexbus-codec(payload encoding/decoding)
§Recovery guidance
Error::TooLargeis a producer-side sizing issue: the encoded payload does not fit in a single slot.Error::UnsupportedCodec/*Mismatcherrors typically indicate a schema mismatch between producer and consumer (wrong expected type or version).Error::Envelope/Error::Codecare data validation failures. In receive paths, the underlying message is still consumed (seeindexbus-coretry_recv_withsemantics).
Variants§
TooLarge
Payload cannot fit into a single slot.
Core(Error)
Error raised by the core region handles.
Envelope(Error)
Error raised while encoding/decoding the v1 header/envelope.
Codec(CodecError)
Error raised by the configured codec.
UnsupportedCodec
The received message uses a codec id that does not match C::CODEC_ID.
SchemaMismatch
schema_id does not match the expected message identity.
TypeMismatch
msg_type does not match the expected message identity.
VersionMismatch
msg_version does not match the expected message identity.
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.1.30.0 · 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()
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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