pub struct PinyinEngine { /* private fields */ }Expand description
Immutable bundle of the dict + the user’s fuzzy preferences. One per
process; share by reference into Session.
Implementations§
Source§impl PinyinEngine
impl PinyinEngine
Sourcepub fn with_fuzzy(fuzzy: FuzzyConfig) -> Self
pub fn with_fuzzy(fuzzy: FuzzyConfig) -> Self
Build with a custom fuzzy config.
Sourcepub fn dict(&self) -> &PinyinDict
pub fn dict(&self) -> &PinyinDict
Borrowed view of the underlying dict — sessions and tests use this for direct lookups.
Sourcepub fn fuzzy(&self) -> FuzzyConfig
pub fn fuzzy(&self) -> FuzzyConfig
Current fuzzy config.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PinyinEngine
impl RefUnwindSafe for PinyinEngine
impl Send for PinyinEngine
impl Sync for PinyinEngine
impl Unpin for PinyinEngine
impl UnsafeUnpin for PinyinEngine
impl UnwindSafe for PinyinEngine
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