#[non_exhaustive]pub enum CorpusError {
Codec(CodecError),
DuplicateVectorId {
id: VectorId,
},
UnknownVectorId {
id: VectorId,
},
PolicyImmutable,
DimensionMismatch {
expected: u32,
got: u32,
},
BatchAtomicityFailure {
index: usize,
source: Box<CorpusError>,
},
}Expand description
Errors produced by the corpus aggregate layer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Codec(CodecError)
An upstream codec operation failed.
#[from] generates impl From<CodecError> for CorpusError.
#[source] makes thiserror implement source() as Some(self.0),
so the inner CodecError is accessible via the standard error chain —
matching the manual impl shown in docs/design/rust/error-model.md.
Do NOT use #[error(transparent)] — that delegates source() to
self.0.source() (None for leaf variants), losing the chain link.
DuplicateVectorId
A vector with this id already exists in the corpus.
UnknownVectorId
A lookup requested a VectorId that does not exist.
PolicyImmutable
An attempt was made to change the compression policy after it was frozen.
DimensionMismatch
A vector’s dimension does not match the corpus’s declared dimension.
Fields
BatchAtomicityFailure
insert_batch failed atomically: the vector at index produced
source; the corpus was not modified.
source is boxed to keep CorpusError Sized.
Fields
source: Box<CorpusError>The error produced by the failing vector.
Trait Implementations§
Source§impl Clone for CorpusError
impl Clone for CorpusError
Source§fn clone(&self) -> CorpusError
fn clone(&self) -> CorpusError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CorpusError
impl Debug for CorpusError
Source§impl Display for CorpusError
impl Display for CorpusError
Source§impl Error for CorpusError
impl Error for CorpusError
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()