#[non_exhaustive]pub enum Error {
Sqlite(Error),
Json(Error),
Io(Error),
Closed,
NotFound(Uuid),
InvalidHlc(String),
SchemaTooNew {
found: i64,
supported: i64,
},
InvalidOp(String),
Embedding(String),
Import(String),
Corrupt(String),
}Expand description
Everything that can go wrong inside grit-core.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sqlite(Error)
Underlying SQLite failure.
Json(Error)
Op or attribute JSON failed to (de)serialize.
Io(Error)
Filesystem failure (export/import).
Closed
The writer actor has shut down; the handle is unusable.
NotFound(Uuid)
A referenced node/edge/episode does not exist.
InvalidHlc(String)
A stored HLC string failed to parse.
SchemaTooNew
The database schema version is newer than this library understands. Migrations are forward-only (Design Invariant 8).
Fields
InvalidOp(String)
An op is structurally invalid (e.g. merging a node into itself).
Embedding(String)
Embedding operations before register_embedding_model, or a dimension
mismatch against the registered model.
Import(String)
An import line could not be understood.
Corrupt(String)
A stored row failed to decode (e.g. a malformed uuid) — the database contains data grit did not write. Surfaced loudly rather than silently dropping the row.
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()