CodePoint

Struct CodePoint 

Source
pub struct CodePoint { /* private fields */ }
Expand description

A Unicode code point. The valid code point ranges are 0x0 to 0x10FFFF.

Implementations§

Source§

impl CodePoint

Source

pub fn new(cp: u32) -> Result<CodePoint, &'static str>

Create new CodePoint with value cp.

If cp is greater than 0x10FFFF, returns Err.

Source

pub fn to_u32(&self) -> u32

Convert CodePoint to u32.

Trait Implementations§

Source§

impl Clone for CodePoint

Source§

fn clone(&self) -> CodePoint

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for CodePoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ucd for CodePoint

Source§

fn dm(&self) -> String

Source§

fn na(&self) -> String

Get the Unicode Name(na) property. If there is no Name property, then returns empty string.
Source§

fn bc(&self) -> Bc

Get the Unicode Bidi_Class(bc) property.
Source§

fn ccc(&self) -> Ccc

Get the Unicode Canonical_Combining_Class(ccc) property.
Source§

fn dt(&self) -> Dt

Get the Unicode Decomposition_Type(dt) property.
Source§

fn gc(&self) -> Gc

Get the Unicode General_Category(gc) property.
Source§

fn gcb(&self) -> Gcb

Get the Unicode Grapheme_Cluster_Break(GCB) property.
Source§

fn wb(&self) -> Wb

Get the Unicode Word_Break(WB) property.
Source§

fn hst(&self) -> Hst

Get the Unicode Hangul_Syllable_Type(hst) property.
Source§

fn insc(&self) -> Insc

Get the Unicode Indic_Syllabic_Category (InSC) property.
Source§

fn incb(&self) -> Incb

Get the Unicode Indic_Conjunct_Break (InCB) property.
Source§

fn wspace(&self) -> bool

Get the Unicode White_Space(WSpace) property.
Source§

fn bidi_c(&self) -> bool

Get the Unicode Bidi_Control(Bidi_C) property.
Source§

fn join_c(&self) -> bool

Get the Unicode Join_Control(Join_C) property.
Source§

fn dash(&self) -> bool

Get the Unicode Dash(Dash) property.
Source§

fn hyphen(&self) -> bool

Get the Unicode Hyphen(Hyphen) property.
Source§

fn qmark(&self) -> bool

Get the Unicode Quotation_Mark(QMark) property.
Source§

fn term(&self) -> bool

Get the Unicode Terminal_Punctuation(Term) property.
Source§

fn omath(&self) -> bool

Get the Unicode Other_Math(OMath) property.
Source§

fn hex(&self) -> bool

Get the Unicode Hex_Digit(Hex) property.
Source§

fn ahex(&self) -> bool

Get the Unicode ASCII_Hex_Digit(AHex) property.
Source§

fn oalpha(&self) -> bool

Get the Unicode Other_Alphabetic(OAlpha) property.
Source§

fn ideo(&self) -> bool

Get the Unicode Ideographic(Ideo) property.
Source§

fn dia(&self) -> bool

Get the Unicode Diacritic(Dia) property.
Source§

fn ext(&self) -> bool

Get the Unicode Extender(Ext) property.
Source§

fn olower(&self) -> bool

Get the Unicode Other_Lowercase(OLower) property.
Source§

fn oupper(&self) -> bool

Get the Unicode Other_Uppercase(OUpper) property.
Source§

fn nchar(&self) -> bool

Get the Unicode Noncharacter_Code_Point(NChar) property.
Source§

fn ogr_ext(&self) -> bool

Get the Unicode Other_Grapheme_Extend(OGr_Ext) property.
Source§

fn idsb(&self) -> bool

Get the Unicode IDS_Binary_Operator(IDSB) property.
Source§

fn idst(&self) -> bool

Get the Unicode IDS_Trinary_Operator(IDST) property.
Source§

fn radical(&self) -> bool

Get the Unicode Radical(Radical) property.
Source§

fn uideo(&self) -> bool

Get the Unicode Unified_Ideograph(UIdeo) property.
Source§

fn odi(&self) -> bool

Get the Unicode Other_Default_Ignorable_Code_Point(ODI) property.
Source§

fn dep(&self) -> bool

Get the Unicode Deprecated(Dep) property.
Source§

fn sd(&self) -> bool

Get the Unicode Soft_Dotted(SD) property.
Source§

fn loe(&self) -> bool

Get the Unicode Logical_Order_Exception(LOE) property.
Source§

fn oids(&self) -> bool

Get the Unicode Other_ID_Start(OIDS) property.
Source§

fn oidc(&self) -> bool

Get the Unicode Other_ID_Continue(OIDC) property.
Source§

fn sterm(&self) -> bool

Get the Unicode Sentence_Terminal(STerm) property.
Source§

fn vs(&self) -> bool

Get the Unicode Variation_Selector(VS) property.
Source§

fn pat_ws(&self) -> bool

Get the Unicode Pattern_White_Space(Pat_WS) property.
Source§

fn pat_syn(&self) -> bool

Get the Unicode Pattern_Syntax(Pat_Syn) property.
Source§

fn pcm(&self) -> bool

Get the Unicode Prepended_Concatenation_Mark(PCM) property.
Source§

fn ri(&self) -> bool

Get the Unicode Regional_Indicator(RI) property.
Source§

fn ce(&self) -> bool

Get the Unicode Composition_Exclusion(CE) property.
Source§

fn ci(&self) -> bool

Get the Unicode Case_Ignorable(CI) property.
Source§

fn comp_ex(&self) -> bool

Get the Unicode Full_Composition_Exclusion(Comp_Ex) property.
Source§

fn blk(&self) -> Blk

Get the Unicode Block(blk) property.
Source§

fn sc(&self) -> Sc

Get the Unicode Script(sc) property.
Source§

fn age(&self) -> Age

Get the Unicode Age(age) property.
Source§

fn math(&self) -> bool

Get the Unicode Math(Math) property.
Source§

fn alpha(&self) -> bool

Get the Unicode Alphabetic(Alpha) property.
Source§

fn lower(&self) -> bool

Get the Unicode Lowercase(Lower) property.
Source§

fn upper(&self) -> bool

Get the Unicode Uppercase(Upper) property.
Source§

fn cased(&self) -> bool

Get the Unicode Cased(Cased) property.
Source§

fn di(&self) -> bool

Get the Unicode Default_Ignorable_Code_Point(DI) property.
Source§

fn gr_ext(&self) -> bool

Get the Unicode Grapheme_Extend(Gr_Ext) property.
Source§

fn ids(&self) -> bool

Get the Unicode ID_Start (IDS) property.
Source§

fn idc(&self) -> bool

Get the Unicode ID_Continue (IDC) property.
Source§

fn xids(&self) -> bool

Get the Unicode XID_Start (XIDS) property.
Source§

fn xidc(&self) -> bool

Get the Unicode XID_Continue (XIDC) property.
Source§

fn emoji(&self) -> bool

Get the Unicode Emoji(Emoji) property.
Source§

fn epres(&self) -> bool

Get the Unicode Emoji_Presentation(EPres) property.
Source§

fn emod(&self) -> bool

Get the Unicode Emoji_Modifier(EMod) property.
Source§

fn ebase(&self) -> bool

Get the Unicode Emoji_Modifier_Base(EBase) property.
Source§

fn ecomp(&self) -> bool

Get the Unicode Emoji_Component(EComp) property.
Source§

fn ext_pict(&self) -> bool

Get the Unicode Extended_Pictographic(ExtPict) property.
Source§

impl Copy for CodePoint

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.