pub trait CodebookConfig:
Sync
+ Send
+ Debug {
// Required methods
fn add_word(&self, word: &str) -> Result<bool, Error>;
fn add_word_global(&self, word: &str) -> Result<bool, Error>;
fn add_ignore(&self, file: &str) -> Result<bool, Error>;
fn get_dictionary_ids(&self) -> Vec<String>;
fn should_ignore_path(&self, path: &Path) -> bool;
fn is_allowed_word(&self, word: &str) -> bool;
fn should_flag_word(&self, word: &str) -> bool;
fn get_ignore_patterns(&self) -> Option<Vec<Regex>>;
fn get_min_word_length(&self) -> usize;
fn cache_dir(&self) -> &Path;
}Expand description
The main trait for Codebook configuration.