use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Error, Debug)]
pub enum Error {
#[error("Collection '{0}' already exists")]
CollectionExists(String),
#[error("Collection '{0}' not found")]
CollectionNotFound(String),
#[error("Vector '{0}' not found")]
VectorNotFound(String),
#[error("Dimension mismatch: expected {expected}, got {actual}")]
DimensionMismatch {
expected: usize,
actual: usize,
},
#[error("Invalid vector: {0}")]
InvalidVector(String),
#[error("Index error: {0}")]
Index(String),
#[error("Persistence error: {0}")]
Persistence(String),
#[error("Configuration error: {0}")]
Configuration(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Internal error: {0}")]
Internal(String),
}