#[non_exhaustive]pub enum IndexError {
Show 13 variants
BadMagic {
found: Vec<u8>,
},
UnsupportedVersion(u64),
InvalidWindowSize(u64),
ExcessiveLength {
what: &'static str,
value: u64,
},
InvalidCheckpoint(&'static str),
ArchiveSizeMismatch {
index_size: u64,
archive_size: u64,
},
Truncated,
WindowCodec(&'static str),
AllocationFailed {
what: &'static str,
},
UnsupportedFlags {
flags: u64,
},
MissingMetadata(&'static str),
IncompatibleFormat {
operation: &'static str,
kind: IndexKind,
},
Io {
source: Arc<Error>,
},
}Expand description
Errors produced while parsing, validating, or writing an index.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadMagic
The file did not begin with the expected magic bytes.
UnsupportedVersion(u64)
The format version is newer than this crate supports.
InvalidWindowSize(u64)
The index declared a window size other than WINDOW_SIZE.
ExcessiveLength
A declared count or length exceeded the accepted maximum.
InvalidCheckpoint(&'static str)
A checkpoint field was denormal or inconsistent.
ArchiveSizeMismatch
A caller-supplied archive size disagreed with the index.
Truncated
The index ended before a complete value could be read.
WindowCodec(&'static str)
A window payload could not be compressed or decompressed.
AllocationFailed
The process could not reserve memory within the configured limit.
UnsupportedFlags
A format contained flags this crate does not understand.
MissingMetadata(&'static str)
An operation requires metadata not present in this index.
IncompatibleFormat
The selected on-disk representation cannot encode this source format.
Fields
Io
An I/O failure occurred.
Trait Implementations§
Source§impl Clone for IndexError
impl Clone for IndexError
Source§fn clone(&self) -> IndexError
fn clone(&self) -> IndexError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
impl Eq for IndexError
Source§impl Error for IndexError
impl Error for IndexError
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()