pub enum DeltaDecodeReason {
EmptyReference,
DataLengthMismatch {
data_len: usize,
reference_len: usize,
},
ReferenceIndexOutOfBounds {
index: usize,
length: usize,
},
DataIndexOutOfBounds {
index: usize,
length: usize,
},
Unknown,
}Expand description
Represents why a delta decode operation failed.
Using an enum instead of String allows for zero-allocation error construction and programmatic error inspection.
Variants§
EmptyReference
The reference bytes were empty.
DataLengthMismatch
The data length is not a multiple of the reference length.
Fields
ReferenceIndexOutOfBounds
The reference bytes index was out of bounds.
Fields
DataIndexOutOfBounds
The data index was out of bounds.
Unknown
An unknown or unexpected error occurred during delta decoding.
This variant is used as a fallback when the underlying error cannot be mapped to a more specific reason (e.g., when downcasting fails).
Trait Implementations§
Source§impl Clone for DeltaDecodeReason
impl Clone for DeltaDecodeReason
Source§fn clone(&self) -> DeltaDecodeReason
fn clone(&self) -> DeltaDecodeReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeltaDecodeReason
impl Debug for DeltaDecodeReason
Source§impl Display for DeltaDecodeReason
impl Display for DeltaDecodeReason
Source§impl Hash for DeltaDecodeReason
impl Hash for DeltaDecodeReason
Source§impl PartialEq for DeltaDecodeReason
impl PartialEq for DeltaDecodeReason
impl Copy for DeltaDecodeReason
impl Eq for DeltaDecodeReason
impl StructuralPartialEq for DeltaDecodeReason
Auto Trait Implementations§
impl Freeze for DeltaDecodeReason
impl RefUnwindSafe for DeltaDecodeReason
impl Send for DeltaDecodeReason
impl Sync for DeltaDecodeReason
impl Unpin for DeltaDecodeReason
impl UnwindSafe for DeltaDecodeReason
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