Skip to main content

SkeyEngine

Struct SkeyEngine 

Source
pub struct SkeyEngine { /* private fields */ }
Expand description

Opaque engine handle — holds only configuration.

Implementations§

Source§

impl SkeyEngine

Source

pub fn new(method: Method) -> Self

Source

pub fn set_method(&mut self, method: Method)

Source

pub fn set_modern(&mut self, v: bool)

Source

pub fn set_short_w(&mut self, v: bool)

Source

pub fn set_auto_restore(&mut self, v: bool)

Source

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.

Source

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.

Source

pub fn clear_words(&mut self)

Remove all user words (reload of the user dictionary file).

Source

pub fn transform(&self, input: &str) -> String

Source

pub fn is_valid(s: &str) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.