#[non_exhaustive]pub enum Error {
IdOrder {
previous: u64,
id: u64,
},
IdPresence {
set_has_ids: bool,
},
Columns {
words: usize,
},
TooManyRecords,
ChunkCount {
chunks: u32,
bits: u32,
},
IsaUnavailable(&'static str),
InvalidHex {
expected: usize,
},
NoTables,
Snapshot {
path: PathBuf,
reason: String,
},
Checksum {
path: PathBuf,
expected: String,
actual: String,
},
OutOfMemory {
what: &'static str,
},
Io {
path: PathBuf,
source: Error,
},
}Expand description
What went wrong. Every failure in this crate, bad input included, is one of these.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IdOrder
A record whose id isn’t above the id before it: records are kept in rising id order.
IdPresence
A record with an id pushed to a values-only set, or a bare value to a set of records.
Columns
Columns for a set that aren’t one per word of the value, or that differ in length from each other or from the ids.
TooManyRecords
A set grown past the 2³² − 1 records a position can address.
ChunkCount
A chunk count for multi-index hashing that doesn’t split the value into equal chunks of 1, 2, 4, 8 or 16 bits.
An instruction set this CPU or build doesn’t have.
InvalidHex
A hex value of the wrong length or with a character that isn’t a hex digit.
NoTables
A multi-index plan forced on a Planned set that has no tables.
Snapshot
A snapshot whose manifest, files or contents don’t agree with each other or with the value width asked for.
Checksum
A snapshot part whose SHA-256 isn’t the one its manifest records.
Fields
OutOfMemory
Memory the allocator wouldn’t give: room for a snapshot’s records, or for multi-index tables.
Io
A file that couldn’t be read or written.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()