Skip to main content

spacedb_vector/
error.rs

1//! Errors for the vector index.
2
3use thiserror::Error;
4
5pub type VectorResult<T> = Result<T, VectorError>;
6
7#[derive(Debug, Error)]
8pub enum VectorError {
9    /// A vector's dimension didn't match the index.
10    #[error("dimension mismatch: index is {expected}-d, got {got}-d")]
11    DimMismatch { expected: usize, got: usize },
12
13    /// Retrieval was attempted without an authorized capability.
14    #[error("retrieval denied: no authorized capability")]
15    Denied,
16}