[][src]Struct kanji::Katakana

pub struct Katakana(_);

A Katakana character, from ア to ン.

These are typically learned after Hiragana, and are used to represent foreign names, sound effects, and occasionally words whose Kanji are "difficult". Two such examples are ネズミ (鼠) and アリ (蟻).

It used to be common to use Katakana as Hiragana are used today, so the phrase君と街を歩きたい would have been written 君ト街ヲ歩キタイ. Admittedly strange to modern eyes!

Implementations

impl Katakana[src]

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

Attempt to form a Katakana. Will fail if the given char is out of the expected Unicode range.

use kanji::Katakana;

assert_eq!(Some('ア'), Katakana::new('ア').map(|k| k.get()));
assert_eq!(None, Katakana::new('匙'));
assert_eq!(None, Katakana::new('a'));

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

Pull out the inner char.

Trait Implementations

impl Clone for Katakana[src]

impl Copy for Katakana[src]

impl Debug for Katakana[src]

impl Eq for Katakana[src]

impl Hash for Katakana[src]

impl Ord for Katakana[src]

impl PartialEq<Katakana> for Katakana[src]

impl PartialOrd<Katakana> for Katakana[src]

impl StructuralEq for Katakana[src]

impl StructuralPartialEq for Katakana[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.