#[non_exhaustive]pub enum Error {
Show 22 variants
Storage {
message: String,
source: Box<dyn Error + Send + Sync + 'static>,
},
Metadata {
message: String,
source: Box<dyn Error + Send + Sync + 'static>,
},
Embedder {
message: String,
source: Box<dyn Error + Send + Sync + 'static>,
},
EmbedderMismatch {
expected: String,
expected_dims: usize,
got: String,
got_dims: usize,
},
PartitionSchemeMismatch {
expected: String,
got: String,
},
PartitionInvalid(PartitionResolveError),
PartitionSchemeInvalid(InvalidScheme),
TenantInvalid(InvalidTenantId),
MemoryNotFound(String),
SummaryNotFound(String),
Tombstoned(String),
LinkInvalid(String),
IndexCorrupt(String),
Recovery(String),
Config(String),
CapabilityMissing {
plugin: &'static str,
required: &'static str,
got: bool,
},
Io(Error),
InvalidAttribute {
reason: String,
},
InvalidAnchor(String),
SnapshotNotFound {
id: String,
},
EmbedderDimMismatch {
old: usize,
new: usize,
},
MigrationConflict {
reason: String,
},
}Expand description
Public error type. Carries structured context where useful.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Storage
Storage backend failure.
Fields
Metadata
Metadata backend failure (SQL, sqlite, migrations).
Fields
Embedder
Embedder failure.
Fields
EmbedderMismatch
embedder.id() does not match the value persisted in schema_meta.
Fields
PartitionSchemeMismatch
Persisted partition scheme differs from the value passed to the builder.
PartitionInvalid(PartitionResolveError)
Partition path was malformed or did not match the scheme.
PartitionSchemeInvalid(InvalidScheme)
Partition scheme template was malformed.
TenantInvalid(InvalidTenantId)
Tenant id was invalid.
MemoryNotFound(String)
Lookup miss.
SummaryNotFound(String)
Summary lookup miss (Plan 9).
Tombstoned(String)
Operation rejected because the memory is soft-tombstoned.
LinkInvalid(String)
Link request invalid (self-link, missing endpoint, etc.).
IndexCorrupt(String)
On-disk index detected as corrupt (Plan 3+).
Recovery(String)
Recovery walker failed to replay an audit-log entry (Plan 3+).
Config(String)
Builder / config validation error.
CapabilityMissing
A configured plugin reported it does not support a capability the engine requires.
Fields
Io(Error)
I/O error (filesystem-side mostly).
InvalidAttribute
Caller passed an crate::attribute::AttributeValue that violates a
constraint — kind mismatch on a range query, non-orderable kind on a
range query, or a decoding failure on read.
InvalidAnchor(String)
Anchor / citation URI failed to parse. See crate::Memory::resolve_anchor.
SnapshotNotFound
Snapshot id was not found in snapshot. Reserved for the
deferred Plan 12 Memory::at / Memory::restore paths;
crate::Memory::delete_snapshot is currently idempotent on
missing rows and does not return this variant.
EmbedderDimMismatch
regenerate_embeddings rejected an embedder whose dim differs
from the persisted store dim.
MigrationConflict
migrate_scheme could not proceed (e.g. previous run is still
in_progress with a different mapper).
Implementations§
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()
Source§impl From<InvalidScheme> for Error
impl From<InvalidScheme> for Error
Source§fn from(source: InvalidScheme) -> Self
fn from(source: InvalidScheme) -> Self
Source§impl From<InvalidTenantId> for Error
impl From<InvalidTenantId> for Error
Source§fn from(source: InvalidTenantId) -> Self
fn from(source: InvalidTenantId) -> Self
Source§impl From<PartitionResolveError> for Error
impl From<PartitionResolveError> for Error
Source§fn from(source: PartitionResolveError) -> Self
fn from(source: PartitionResolveError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more