CodebookConfig

Trait CodebookConfig 

Source
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.

Required Methods§

Source

fn add_word(&self, word: &str) -> Result<bool, Error>

Source

fn add_word_global(&self, word: &str) -> Result<bool, Error>

Source

fn add_ignore(&self, file: &str) -> Result<bool, Error>

Source

fn get_dictionary_ids(&self) -> Vec<String>

Source

fn should_ignore_path(&self, path: &Path) -> bool

Source

fn is_allowed_word(&self, word: &str) -> bool

Source

fn should_flag_word(&self, word: &str) -> bool

Source

fn get_ignore_patterns(&self) -> Option<Vec<Regex>>

Source

fn get_min_word_length(&self) -> usize

Source

fn cache_dir(&self) -> &Path

Implementors§