pub enum Tone {
None,
Grave,
Acute,
HookAbove,
Tilde,
DotBelow,
}Tone (thanh điệu), which also called "accent", lists all possible
tones in Vietnamese.
These tones are:
| Tone | Example |
| None | a |
| Grave | à |
| Acute | á |
| Hook above | ả |
| Tilde | ã |
| Dot below | ạ |
Get tone from a char ch.
In case of ch is non-toned, Tone::None is returned.
assert_eq!(Tone::get_tone('á'), Tone::Acute);Run
Add a tone tone to char ch.
In case of ch is non-toned, the original ch is returned.
assert_eq!(Tone::add_tone('á', Tone::Tilde), 'ã');Run
Clear the tone in ch. Return the result and the old tone.
In case of non-toned ch, the original ch is returned
with Tone::None.
assert_eq!(Tone::clear_tone('á'), ('a', Tone::Acute));Run
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Mutably borrows from an owned value. Read more