Files
smartdb/rust/crates/rustdb-index/src/error.rs

16 lines
448 B
Rust

/// Errors from index operations.
#[derive(Debug, thiserror::Error)]
pub enum IndexError {
#[error("Duplicate key error: index '{index}' has duplicate value for key {key}")]
DuplicateKey { index: String, key: String },
#[error("Index not found: {0}")]
IndexNotFound(String),
#[error("Invalid index specification: {0}")]
InvalidIndex(String),
#[error("Cannot drop protected index: {0}")]
ProtectedIndex(String),
}