#[non_exhaustive]pub enum Error {
CapacityExceeded {
what: &'static str,
},
TooLarge {
what: &'static str,
len: usize,
max: usize,
},
DimMismatch {
got: usize,
want: usize,
},
NotFound(FactId),
AlreadyClosed(FactId),
ConfigMismatch(&'static str),
Corrupt(&'static str),
UnsupportedVersion(u16),
Invalid(&'static str),
Storage(String),
Arena(Error),
}Expand description
Every way an engine call can fail.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CapacityExceeded
A pool or table would grow past its configured ceiling.
TooLarge
A single input value is larger than its configured maximum.
Fields
DimMismatch
An input vector’s dimension does not match Config::dim.
Fields
NotFound(FactId)
The referenced fact does not exist (or was purged).
AlreadyClosed(FactId)
revise targeted a fact whose validity interval is already closed.
ConfigMismatch(&'static str)
The supplied Config is invalid, or incompatible with the config
stored in an existing database (changing dim or shard counts
requires a reindex, not an open).
Corrupt(&'static str)
A snapshot or journal failed validation.
UnsupportedVersion(u16)
The snapshot was written by an unknown format version.
Invalid(&'static str)
An input violates a structural rule that is not a size limit (a link without a subject entity, an empty tag, a name with no indexable characters).
Storage(String)
The Storage implementation failed;
carries the implementation error’s debug rendering (the engine
stays generic and cloneable, the wrapper logs the original).
Arena(Error)
An underlying storage-structure error (bubbled up from the arena layer with its context intact).
Trait Implementations§
impl Eq for Error
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()