2019-10-31 15:00:36 +01:00
|
|
|
use std::fmt;
|
|
|
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum UpdateOperation {
|
|
|
|
ClearAllDocuments,
|
|
|
|
DocumentsAddition,
|
|
|
|
DocumentsDeletion,
|
2019-12-11 16:49:09 +01:00
|
|
|
SynonymsUpdate,
|
2019-10-31 15:00:36 +01:00
|
|
|
SynonymsDeletion,
|
|
|
|
StopWordsAddition,
|
|
|
|
StopWordsDeletion,
|
|
|
|
Schema,
|
|
|
|
Config,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl fmt::Display for UpdateOperation {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> std::fmt::Result {
|
|
|
|
use UpdateOperation::*;
|
|
|
|
|
|
|
|
match self {
|
|
|
|
ClearAllDocuments => write!(f, "ClearAllDocuments"),
|
|
|
|
DocumentsAddition => write!(f, "DocumentsAddition"),
|
|
|
|
DocumentsDeletion => write!(f, "DocumentsDeletion"),
|
2019-12-11 16:49:09 +01:00
|
|
|
SynonymsUpdate => write!(f, "SynonymsUpdate"),
|
2019-10-31 15:00:36 +01:00
|
|
|
SynonymsDeletion => write!(f, "SynonymsDelettion"),
|
|
|
|
StopWordsAddition => write!(f, "StopWordsAddition"),
|
|
|
|
StopWordsDeletion => write!(f, "StopWordsDeletion"),
|
|
|
|
Schema => write!(f, "Schema"),
|
|
|
|
Config => write!(f, "Config"),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|