#[non_exhaustive]pub enum DeltaCorruption {
BaseLenMismatch {
declared: u32,
actual: usize,
},
ReservedOpcodeBits(u8),
ZeroOpcode,
ZeroLengthCopy,
CopyPastBase {
offset: u32,
length: u16,
base_len: usize,
},
ResultLenOverrun {
emitted: usize,
requested: usize,
result_len: usize,
},
ResultLenUnderrun {
expected: usize,
actual: usize,
},
}Expand description
The specific kind of structural corruption a v1 delta stream failed
on (MKIT-13), carried by MkitError::DeltaCorrupt. #[non_exhaustive]
so a future delta-stream kind (v2, say) can add a corruption variant
without that being a breaking change for downstream matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BaseLenMismatch
The stream’s declared base_len header field does not match the
actual length of the base object passed to decode.
ReservedOpcodeBits(u8)
A COPY opcode had one or more of its reserved low 7 bits set.
ZeroOpcode
The reserved 0x00 opcode appeared in the instruction stream.
ZeroLengthCopy
A COPY opcode declared a zero-length copy, which SPEC-DELTA §3
forbids (length MUST be >= 1).
CopyPastBase
A COPY opcode’s offset + length exceeds the base length (or
overflows while computing it), reading past the end of the base.
ResultLenOverrun
Applying the next instruction would emit more bytes than the
stream’s declared result_len.
ResultLenUnderrun
The instruction stream ended having emitted fewer bytes than the
declared result_len.
Trait Implementations§
Source§impl Clone for DeltaCorruption
impl Clone for DeltaCorruption
Source§impl Debug for DeltaCorruption
impl Debug for DeltaCorruption
Source§impl Display for DeltaCorruption
impl Display for DeltaCorruption
impl Eq for DeltaCorruption
Source§impl Error for DeltaCorruption
impl Error for DeltaCorruption
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 PartialEq for DeltaCorruption
impl PartialEq for DeltaCorruption
impl StructuralPartialEq for DeltaCorruption
Auto Trait Implementations§
impl Freeze for DeltaCorruption
impl RefUnwindSafe for DeltaCorruption
impl Send for DeltaCorruption
impl Sync for DeltaCorruption
impl Unpin for DeltaCorruption
impl UnsafeUnpin for DeltaCorruption
impl UnwindSafe for DeltaCorruption
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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