pub struct SkeyEngine { /* private fields */ }Expand description
Opaque engine handle — holds only configuration.
Implementations§
Source§impl SkeyEngine
impl SkeyEngine
pub fn new(method: Method) -> Self
pub fn set_method(&mut self, method: Method)
pub fn set_modern(&mut self, v: bool)
pub fn set_short_w(&mut self, v: bool)
pub fn set_auto_restore(&mut self, v: bool)
Sourcepub fn set_dict(&mut self, v: bool)
pub fn set_dict(&mut self, v: bool)
Dictionary mode: auto-restore validates the composed output against
the embedded Vietnamese word list instead of syllable rules. Words
the list lacks (user vocabulary) can be added with add_word.
Sourcepub fn add_word(&mut self, word: &str)
pub fn add_word(&mut self, word: &str)
Add a user word (kept lowercase). User words are checked before the embedded list, so they override a missing entry.
Sourcepub fn clear_words(&mut self)
pub fn clear_words(&mut self)
Remove all user words (reload of the user dictionary file).
pub fn transform(&self, input: &str) -> String
pub fn is_valid(s: &str) -> bool
Auto Trait Implementations§
impl Freeze for SkeyEngine
impl RefUnwindSafe for SkeyEngine
impl Send for SkeyEngine
impl Sync for SkeyEngine
impl Unpin for SkeyEngine
impl UnsafeUnpin for SkeyEngine
impl UnwindSafe for SkeyEngine
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