pub struct Inventory { /* private fields */ }Expand description
The syllables a dictionary knows, and every proper prefix of them, held in memory for the life of one activation.
Implementations§
Source§impl Inventory
impl Inventory
Sourcepub fn new<I, S>(syllables: I) -> Self
pub fn new<I, S>(syllables: I) -> Self
An inventory of syllables, which are lowercase ASCII as msime-cantonese.db stores them.
Sourcepub fn load(dictionary: &LanguageDictionary) -> Result<Self>
pub fn load(dictionary: &LanguageDictionary) -> Result<Self>
Reads the syllables table once.
pub fn contains(&self, syllable: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inventory
impl RefUnwindSafe for Inventory
impl Send for Inventory
impl Sync for Inventory
impl Unpin for Inventory
impl UnsafeUnpin for Inventory
impl UnwindSafe for Inventory
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