Struct chewing::dictionary::TrieBuf
source · pub struct TrieBuf { /* private fields */ }Implementations§
Trait Implementations§
source§impl Dictionary for TrieBuf
impl Dictionary for TrieBuf
source§fn lookup_first_n_phrases(
&self,
syllables: &dyn SyllableSlice,
first: usize
) -> Vec<Phrase>
fn lookup_first_n_phrases( &self, syllables: &dyn SyllableSlice, first: usize ) -> Vec<Phrase>
Returns first N phrases matched by the syllables. Read more
source§fn about(&self) -> DictionaryInfo
fn about(&self) -> DictionaryInfo
Returns information about the dictionary instance.
fn as_dict_mut(&mut self) -> Option<&mut dyn DictionaryMut>
source§fn lookup_first_phrase(&self, syllables: &dyn SyllableSlice) -> Option<Phrase>
fn lookup_first_phrase(&self, syllables: &dyn SyllableSlice) -> Option<Phrase>
Returns the first phrase matched by the syllables. Read more
source§fn lookup_all_phrases(&self, syllables: &dyn SyllableSlice) -> Vec<Phrase>
fn lookup_all_phrases(&self, syllables: &dyn SyllableSlice) -> Vec<Phrase>
Returns all phrases matched by the syllables. Read more
source§impl DictionaryMut for TrieBuf
impl DictionaryMut for TrieBuf
source§fn reopen(&mut self) -> Result<(), UpdateDictionaryError>
fn reopen(&mut self) -> Result<(), UpdateDictionaryError>
Reopens the dictionary if it was changed by a different process Read more
source§fn flush(&mut self) -> Result<(), UpdateDictionaryError>
fn flush(&mut self) -> Result<(), UpdateDictionaryError>
Flushes all the changes back to the filesystem Read more
source§fn add_phrase(
&mut self,
syllables: &dyn SyllableSlice,
phrase: Phrase
) -> Result<(), UpdateDictionaryError>
fn add_phrase( &mut self, syllables: &dyn SyllableSlice, phrase: Phrase ) -> Result<(), UpdateDictionaryError>
An method for updating dictionaries. Read more
source§fn update_phrase(
&mut self,
syllables: &dyn SyllableSlice,
phrase: Phrase,
user_freq: u32,
time: u64
) -> Result<(), UpdateDictionaryError>
fn update_phrase( &mut self, syllables: &dyn SyllableSlice, phrase: Phrase, user_freq: u32, time: u64 ) -> Result<(), UpdateDictionaryError>
TODO: doc
source§fn remove_phrase(
&mut self,
syllables: &dyn SyllableSlice,
phrase_str: &str
) -> Result<(), UpdateDictionaryError>
fn remove_phrase( &mut self, syllables: &dyn SyllableSlice, phrase_str: &str ) -> Result<(), UpdateDictionaryError>
TODO: doc
Auto Trait Implementations§
impl Freeze for TrieBuf
impl !RefUnwindSafe for TrieBuf
impl Send for TrieBuf
impl Sync for TrieBuf
impl Unpin for TrieBuf
impl !UnwindSafe for TrieBuf
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more