#[non_exhaustive]pub enum CoreError {
Io {
path: PathBuf,
source: Error,
},
BareIo(Error),
BadMagic {
expected: u32,
found: u32,
},
UnsupportedVersion {
found: u16,
supported: u16,
},
PageCorrupt {
page_id: u64,
expected: u32,
computed: u32,
},
MalformedPage(String),
Serialization(Error),
TooLarge(String),
NotFound(String),
AlreadyExists(String),
InvalidArgument(String),
}Expand description
Errors returned by the storage engine.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
An I/O operation failed against a known path.
BareIo(Error)
An I/O operation failed without an associated path.
BadMagic
A page or file carried the wrong magic number — a different file kind, or not a Quiver file at all.
UnsupportedVersion
The on-disk format version is not understood by this build.
PageCorrupt
A page failed its CRC32C check — corruption or tampering was detected.
Fields
MalformedPage(String)
A page or file header was structurally invalid (impossible length, unknown page type, out-of-order page id, …).
Serialization(Error)
Serialization or deserialization of a metadata structure failed.
TooLarge(String)
A value exceeded a hard structural limit (e.g. a payload larger than a page body, or a WAL record over the size cap).
NotFound(String)
A referenced collection or record does not exist.
AlreadyExists(String)
A resource that must be unique already exists (e.g. a collection name).
InvalidArgument(String)
A caller supplied an invalid argument (e.g. a vector of the wrong dim).
Implementations§
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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()