implements the index deletion, creation and swap

This commit is contained in:
Tamo 2022-09-07 21:27:06 +02:00 committed by Clément Renault
parent 72b2e68de4
commit 30d2b24689
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
4 changed files with 70 additions and 7 deletions

View file

@ -5,9 +5,9 @@ use crate::index;
#[derive(Error, Debug)]
pub enum Error {
#[error("Index `{}` not found", .0)]
#[error("Index `{0}` not found")]
IndexNotFound(String),
#[error("Index `{}` already exists", .0)]
#[error("Index `{0}` already exists")]
IndexAlreadyExists(String),
#[error("Corrupted task queue.")]
CorruptedTaskQueue,
@ -17,6 +17,8 @@ pub enum Error {
Milli(#[from] milli::Error),
#[error("{0}")]
IndexError(#[from] index::error::IndexError),
#[error(transparent)]
IoError(#[from] std::io::Error),
#[error(transparent)]
Anyhow(#[from] anyhow::Error),