Skip to main content

Engine

Struct Engine 

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

The main entry point for the Vietnamese Input Method Engine.

Implementations§

Source§

impl Engine

Source

pub fn new(input_method: InputMethod) -> Self

Source

pub fn with_config(input_method: InputMethod, config: Config) -> Self

Source

pub fn config(&self) -> Config

Source

pub fn set_config(&mut self, config: Config)

Source

pub fn input_method(&self) -> InputMethod

Source

pub fn process(&mut self, s: &str, mode: Mode) -> String

Source

pub fn process_str(&mut self, s: &str, mode: Mode) -> &Self

Source

pub fn process_key(&mut self, key: char, mode: Mode)

Source

pub fn commit(&mut self)

Source

pub fn output(&self) -> String

Source

pub fn get_processed_str(&self, options: OutputOptions) -> String

Source

pub fn is_valid(&self, input_is_full_complete: bool) -> bool

Source

pub fn restore_last_word(&mut self, to_vietnamese: bool)

Source

pub fn remove_last_char(&mut self, refresh_last_tone_target: bool)

Source

pub fn reset(&mut self)

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.