[−][src]Struct kanji::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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Kanji
[src]
fn cmp(&self, other: &Kanji) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Kanji> for Kanji
[src]
impl PartialOrd<Kanji> for Kanji
[src]
fn partial_cmp(&self, other: &Kanji) -> Option<Ordering>
[src]
fn lt(&self, other: &Kanji) -> bool
[src]
fn le(&self, other: &Kanji) -> bool
[src]
fn gt(&self, other: &Kanji) -> bool
[src]
fn ge(&self, other: &Kanji) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,