pub enum BundleError {
EmptyKey,
DuplicateKey(String),
TooShort,
BadMagic,
UnsupportedVersion(u16),
LengthMismatch {
header: u64,
actual: usize,
},
CrcMismatch {
expected: u32,
got: u32,
},
BadIndexPointer {
offset: u64,
length: u64,
total: usize,
},
EntryOutOfBounds {
key: String,
offset: u64,
length: u64,
},
UnpageAligned {
key: String,
offset: u64,
alignment: usize,
},
Cbor(String),
Io(String),
}Expand description
An error building or reading a .hmc bundle.
Variants§
EmptyKey
A key was empty.
DuplicateKey(String)
Two entries shared a key.
TooShort
The byte slice is shorter than the fixed header.
BadMagic
The magic bytes were not QBDL.
UnsupportedVersion(u16)
The version is not one this build understands.
LengthMismatch
The header’s total_length did not match the actual byte length.
CrcMismatch
The whole-file CRC did not match (corruption or tampering).
BadIndexPointer
The index offset/length pointed outside the file.
EntryOutOfBounds
An entry’s [offset, length) fell outside the payload region.
UnpageAligned
An entry was not aligned to the expected byte boundary.
Cbor(String)
The CBOR index could not be encoded/decoded.
Io(String)
An I/O error (mmap/open), native only.
Trait Implementations§
Source§impl Debug for BundleError
impl Debug for BundleError
Source§impl Display for BundleError
impl Display for BundleError
Source§impl Error for BundleError
impl Error for BundleError
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()
Source§impl From<BundleError> for MixedError
impl From<BundleError> for MixedError
Source§fn from(e: BundleError) -> Self
fn from(e: BundleError) -> Self
Converts to this type from the input type.
Source§impl From<BundleError> for InstrumentError
impl From<BundleError> for InstrumentError
Source§fn from(value: BundleError) -> Self
fn from(value: BundleError) -> Self
Converts to this type from the input type.
Source§impl From<BundleError> for HmcAssetPackageError
impl From<BundleError> for HmcAssetPackageError
Source§fn from(value: BundleError) -> Self
fn from(value: BundleError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BundleError
impl RefUnwindSafe for BundleError
impl Send for BundleError
impl Sync for BundleError
impl Unpin for BundleError
impl UnsafeUnpin for BundleError
impl UnwindSafe for BundleError
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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