[][src]Struct kanji::Kanji

pub struct Kanji(_);

A single symbol of Kanji, also known as a CJK Unified Ideograph.

Japanese Kanji were borrowed from China over several waves during the last 1,500 years. Japan declares 2,136 of these as their standard set, with rarer characters being the domain of place names, academia and writers.

Japanese has many Japan-only Kanji. Common ones include:

  • 畑 (a type of rice field)
  • 峠 (a narrow mountain pass)
  • 働 (to do physical labour)

Implementations

impl Kanji[src]

pub fn new(c: char) -> Option<Kanji>[src]

Attempt to form a Kanji. Will fail if the given char is out of the Unicode range that Japanese text inhabits.

use kanji::Kanji;

assert_eq!(Some('志'), Kanji::new('志').map(|k| k.get()));
assert_eq!(None, Kanji::new('a'));

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

Pull out the inner char.

Trait Implementations

impl Clone for Kanji[src]

impl Copy for Kanji[src]

impl Debug for Kanji[src]

impl Eq for Kanji[src]

impl Hash for Kanji[src]

impl Ord for Kanji[src]

impl PartialEq<Kanji> for Kanji[src]

impl PartialOrd<Kanji> for Kanji[src]

impl StructuralEq for Kanji[src]

impl StructuralPartialEq for Kanji[src]

Auto Trait Implementations

impl RefUnwindSafe for Kanji

impl Send for Kanji

impl Sync for Kanji

impl Unpin for Kanji

impl UnwindSafe for Kanji

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.