[]Enum gokien::mark::Mark

pub enum Mark {
    None,
    Hat,
    Horn,
    Breve,
    Dash,
}

Mark lists all possible mark in Vietnamese, including:

Mark Example
None Non-marked
Hat (or circumflex) â
Horn ư
Breve ă
Dash đ

Variants

Methods

impl Mark

Get mark of character ch.

In case of ch is non-marked, Mark::None is returned.

Example

assert_eq!(Mark::get_mark('â'), Mark::Hat);Run

Add a mark to ch and return wanted character.

In case of ch is non-marked, the original ch is returned.

Example

assert_eq!(Mark::add_mark('â', Mark::Breve), 'ă');Run

Clear the mark in ch. Return the result and the old mark.

In case of non-marked ch, the original ch is returned with Mark::None.

Example

assert_eq!(Mark::clear_mark('đ'), ('d', Mark::Dash));Run

Trait Implementations

impl PartialEq<Mark> for Mark

This method tests for !=.

impl From<usize> for Mark

impl Debug for Mark

Auto Trait Implementations

impl Send for Mark

impl Sync for Mark

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]