Enum UnicodeCategory

Source
pub enum UnicodeCategory {
Show 30 variants Pe, Pc, Cc, Sc, Pd, Nd, Me, Pf, Cf, Pi, Nl, Zl, Ll, Sm, Lm, Sk, Mn, Ps, Lo, No, Po, So, Zp, Co, Zs, Mc, Cs, Lt, Cn, Lu,
}
Expand description

Unicode category abbreviation.

Variants§

§

Pe

Close Punctuation.

§

Pc

Connector Punctuation.

§

Cc

Control.

§

Sc

Currency Symbol.

§

Pd

Dash Punctuation.

§

Nd

Decimal Number.

§

Me

Enclosing Mark.

§

Pf

Final Punctuation.

§

Cf

Format.

§

Pi

Initial Punctuation.

§

Nl

Letter Number.

§

Zl

Line Separator.

§

Ll

Lowercase Letter.

§

Sm

Math Symbol.

§

Lm

Modifier Letter.

§

Sk

Modifier Symbol.

§

Mn

Nonspacing Mark.

§

Ps

Open Punctuation.

§

Lo

Other Letter.

§

No

Other Number.

§

Po

Other Punctuation.

§

So

Other Symbol.

§

Zp

Paragraph Separator.

§

Co

Private Use.

§

Zs

Space Separator.

§

Mc

Spacing Mark.

§

Cs

Surrogate.

§

Lt

Titlecase Letter.

§

Cn

Unassigned.

§

Lu

Uppercase Letter.

Implementations§

Source§

impl UnicodeCategory

Source

pub const L: UnicodeCategorySet

Letters.

Source

pub const M: UnicodeCategorySet

Marks.

Source

pub const N: UnicodeCategorySet

Numbers.

Source

pub const P: UnicodeCategorySet

Punctuation.

Source

pub const S: UnicodeCategorySet

Symbols.

Source

pub const Z: UnicodeCategorySet

Separators.

Source

pub const C: UnicodeCategorySet

Control, format, private, unassigned and surrogates.

Source

pub const CLOSE_PUNCTUATION: UnicodeCategory = Pe

Close Punctuation (alias).

Source

pub const CONNECTOR_PUNCTUATION: UnicodeCategory = Pc

Connector Punctuation (alias).

Source

pub const CONTROL: UnicodeCategory = Cc

Control (alias).

Source

pub const CURRENCY_SYMBOL: UnicodeCategory = Sc

Currency Symbol (alias).

Source

pub const DASH_PUNCTUATION: UnicodeCategory = Pd

Dash Punctuation (alias).

Source

pub const DECIMAL_NUMBER: UnicodeCategory = Nd

Decimal Number (alias).

Source

pub const ENCLOSING_MARK: UnicodeCategory = Me

Enclosing Mark (alias).

Source

pub const FINAL_PUNCTUATION: UnicodeCategory = Pf

Final Punctuation (alias).

Source

pub const FORMAT: UnicodeCategory = Cf

Format (alias).

Source

pub const INITIAL_PUNCTUATION: UnicodeCategory = Pi

Initial Punctuation (alias).

Source

pub const LETTER_NUMBER: UnicodeCategory = Nl

Letter Number (alias).

Source

pub const LINE_SEPARATOR: UnicodeCategory = Zl

Line Separator (alias).

Source

pub const LOWERCASE_LETTER: UnicodeCategory = Ll

Lowercase Letter (alias).

Source

pub const MATH_SYMBOL: UnicodeCategory = Sm

Math Symbol (alias).

Source

pub const MODIFIER_LETTER: UnicodeCategory = Lm

Modifier Letter (alias).

Source

pub const MODIFIER_SYMBOL: UnicodeCategory = Sk

Modifier Symbol (alias).

Source

pub const NONSPACING_MARK: UnicodeCategory = Mn

Nonspacing Mark (alias).

Source

pub const OPEN_PUNCTUATION: UnicodeCategory = Ps

Open Punctuation (alias).

Source

pub const OTHER_LETTER: UnicodeCategory = Lo

Other Letter (alias).

Source

pub const OTHER_NUMBER: UnicodeCategory = No

Other Number (alias).

Source

pub const OTHER_PUNCTUATION: UnicodeCategory = Po

Other Punctuation (alias).

Source

pub const OTHER_SYMBOL: UnicodeCategory = So

Other Symbol (alias).

Source

pub const PARAGRAPH_SEPARATOR: UnicodeCategory = Zp

Paragraph Separator (alias).

Source

pub const PRIVATE_USE: UnicodeCategory = Co

Private Use (alias).

Source

pub const SPACE_SEPARATOR: UnicodeCategory = Zs

Space Separator (alias).

Source

pub const SPACING_MARK: UnicodeCategory = Mc

Spacing Mark (alias).

Source

pub const SURROGATE: UnicodeCategory = Cs

Surrogate (alias).

Source

pub const TITLECASE_LETTER: UnicodeCategory = Lt

Titlecase Letter (alias).

Source

pub const UNASSIGNED: UnicodeCategory = Cn

Unassigned (alias).

Source

pub const UPPERCASE_LETTER: UnicodeCategory = Lu

Uppercase Letter (alias).

Source

pub const fn as_str(self) -> &'static str

Abbreviation as a string.

Trait Implementations§

Source§

impl BitOr<UnicodeCategory> for UnicodeCategorySet

Source§

type Output = UnicodeCategorySet

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: UnicodeCategory) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<UnicodeCategorySet> for UnicodeCategory

Source§

type Output = UnicodeCategorySet

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: UnicodeCategorySet) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr for UnicodeCategory

Source§

type Output = UnicodeCategorySet

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign<UnicodeCategory> for UnicodeCategorySet

Source§

fn bitor_assign(&mut self, rhs: UnicodeCategory)

Performs the |= operation. Read more
Source§

impl Clone for UnicodeCategory

Source§

fn clone(&self) -> UnicodeCategory

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for UnicodeCategory

Source§

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

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

impl Display for UnicodeCategory

Source§

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

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

impl From<UnicodeCategory> for Option<UnicodeCategorySet>

Source§

fn from(category: UnicodeCategory) -> Self

Converts to this type from the input type.
Source§

impl From<UnicodeCategory> for UnicodeCategorySet

Source§

fn from(category: UnicodeCategory) -> Self

Converts to this type from the input type.
Source§

impl FromStr for UnicodeCategory

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for UnicodeCategory

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for UnicodeCategory

Source§

fn eq(&self, other: &UnicodeCategory) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for UnicodeCategory

Source§

impl Eq for UnicodeCategory

Source§

impl StructuralPartialEq for UnicodeCategory

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.