[][src]Enum kanji::Character

pub enum Character {
    Kanji(Kanji),
    Hiragana(Hiragana),
    Katakana(Katakana),
    Punctuation(Punctuation),
    AlphaNum(AlphaNum),
    ASCII(ASCII),
    Other(char),
}

General categories for characters, at least as is useful for thinking about Japanese.

Japanese "full-width" numbers and letters are counted as AlphaNum, whereas "normal" ASCII characters have the ASCII variant.

Variants

Kanji(Kanji)
Hiragana(Hiragana)
Katakana(Katakana)
Punctuation(Punctuation)
AlphaNum(AlphaNum)
ASCII(ASCII)
Other(char)

Implementations

impl Character[src]

pub fn new(c: char) -> Character[src]

Form a new Character from some char.

pub fn kanji(&self) -> Option<Kanji>[src]

A convenience method for attempting to extract a possible Kanji.

pub fn get(&self) -> char[src]

Pull out the inner char.

Trait Implementations

impl Clone for Character[src]

impl Copy for Character[src]

impl Debug for Character[src]

impl Eq for Character[src]

impl Hash for Character[src]

impl Ord for Character[src]

impl PartialEq<Character> for Character[src]

impl PartialOrd<Character> for Character[src]

impl StructuralEq for Character[src]

impl StructuralPartialEq for Character[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.