pub enum AgentDbError {
Sqlite(Error),
Serialization(String),
CollectionNotFound(String),
DimensionMismatch {
expected: usize,
got: usize,
},
NodeNotFound(String),
EdgeNotFound {
src: String,
dst: String,
},
SchemaMigration,
Corruption(String),
InvalidArgument(String),
}Expand description
All errors that AgentDB operations can produce.
Every public API function returns Result<T> which aliases
std::result::Result<T, AgentDbError>.
Variants§
Sqlite(Error)
Underlying SQLite operation failed.
Serialization(String)
JSON (de)serialization failed; the message describes what went wrong.
CollectionNotFound(String)
The named vector collection does not exist in the database.
DimensionMismatch
The caller supplied a vector whose length differs from the collection’s declared dimensionality.
NodeNotFound(String)
A memory graph node with the given ID does not exist.
EdgeNotFound
A directed edge between the given nodes does not exist.
SchemaMigration
The on-disk schema version is newer or older than this library expects.
Run agentdb migrate to bring the database up to date.
Corruption(String)
Low-level database corruption was detected (checksum failure, unexpected NULL in a required column, etc.).
InvalidArgument(String)
A caller-supplied argument was out of range or otherwise invalid.
Trait Implementations§
Source§impl Debug for AgentDbError
impl Debug for AgentDbError
Source§impl Display for AgentDbError
impl Display for AgentDbError
Source§impl Error for AgentDbError
impl Error for AgentDbError
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()