Trait Dictionary

Source
pub trait Dictionary {
    // Required methods
    fn get_random_word(&self) -> Option<DictionaryEntry>;
    fn find_word(&self, text: &str) -> Option<DictionaryEntry>;
    fn create_word(
        &self,
        word_entry: DictionaryEntry,
    ) -> Option<DictionaryEntry>;
    fn guessed_word(&self, word_entry: DictionaryEntry);
}
Expand description

Provides basic functions for reading and writing from and to a dictionary

Required Methods§

Implementors§