#[non_exhaustive]pub enum CedarPersistenceError {
Io(Error),
Truncated,
InvalidMagic,
UnsupportedVersion {
major: u16,
minor: u16,
},
UnsupportedByteOrder {
byte_order: u8,
},
LayoutMismatch {
expected: u8,
found: u8,
},
InvalidHeader {
field: &'static str,
value: u64,
},
AllocationLimitExceeded {
requested: usize,
limit: usize,
},
AllocationFailed {
requested: usize,
},
CorruptData {
section: &'static str,
index: usize,
reason: &'static str,
},
TrailingData,
}Expand description
Errors returned while saving or loading cedarwood’s versioned binary format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
The underlying stream or filesystem operation failed.
Truncated
The input ended before the complete declared representation was read.
InvalidMagic
The eight-byte cedarwood format marker did not match.
UnsupportedVersion
The file uses a format version this reader does not understand.
UnsupportedByteOrder
The file is not explicitly marked as little-endian.
LayoutMismatch
The file was produced for a different compile-time trie layout.
InvalidHeader
Reserved header flags were set or a header field was otherwise invalid.
AllocationLimitExceeded
Loading and structural validation would reserve more memory than the caller allows.
AllocationFailed
The allocator could not reserve the validated amount of memory.
CorruptData
A structural invariant failed validation.
TrailingData
Bytes remained after the complete declared representation.
Trait Implementations§
Source§impl Debug for CedarPersistenceError
impl Debug for CedarPersistenceError
Source§impl Display for CedarPersistenceError
Available on crate feature std only.
impl Display for CedarPersistenceError
std only.Source§impl Error for CedarPersistenceError
Available on crate feature std only.
impl Error for CedarPersistenceError
std only.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()