#[repr(u8)]
pub enum GeneralCategory {
Show 30 variants Unassigned, UppercaseLetter, LowercaseLetter, TitlecaseLetter, ModifierLetter, OtherLetter, NonspacingMark, SpacingMark, EnclosingMark, DecimalNumber, LetterNumber, OtherNumber, SpaceSeparator, LineSeparator, ParagraphSeparator, Control, Format, PrivateUse, Surrogate, DashPunctuation, OpenPunctuation, ClosePunctuation, ConnectorPunctuation, InitialPunctuation, FinalPunctuation, OtherPunctuation, MathSymbol, CurrencySymbol, ModifierSymbol, OtherSymbol,
}
Expand description

Enumerated property General_Category.

General_Category specifies the most general classification of a code point, usually determined based on the primary characteristic of the assigned character. For example, is the character a letter, a mark, a number, punctuation, or a symbol, and if so, of what type?

GeneralCategory only supports specific subcategories (eg UppercaseLetter). It does not support grouped categories (eg Letter). For grouped categories, use GeneralCategoryGroup.

Variants

Unassigned

(Cn) A reserved unassigned code point or a noncharacter

UppercaseLetter

(Lu) An uppercase letter

LowercaseLetter

(Ll) A lowercase letter

TitlecaseLetter

(Lt) A digraphic letter, with first part uppercase

ModifierLetter

(Lm) A modifier letter

OtherLetter

(Lo) Other letters, including syllables and ideographs

NonspacingMark

(Mn) A nonspacing combining mark (zero advance width)

SpacingMark

(Mc) A spacing combining mark (positive advance width)

EnclosingMark

(Me) An enclosing combining mark

DecimalNumber

(Nd) A decimal digit

LetterNumber

(Nl) A letterlike numeric character

OtherNumber

(No) A numeric character of other type

SpaceSeparator

(Zs) A space character (of various non-zero widths)

LineSeparator

(Zl) U+2028 LINE SEPARATOR only

ParagraphSeparator

(Zp) U+2029 PARAGRAPH SEPARATOR only

Control

(Cc) A C0 or C1 control code

Format

(Cf) A format control character

PrivateUse

(Co) A private-use character

Surrogate

(Cs) A surrogate code point

DashPunctuation

(Pd) A dash or hyphen punctuation mark

OpenPunctuation

(Ps) An opening punctuation mark (of a pair)

ClosePunctuation

(Pe) A closing punctuation mark (of a pair)

ConnectorPunctuation

(Pc) A connecting punctuation mark, like a tie

InitialPunctuation

(Pi) An initial quotation mark

FinalPunctuation

(Pf) A final quotation mark

OtherPunctuation

(Po) A punctuation mark of other type

MathSymbol

(Sm) A symbol of mathematical use

CurrencySymbol

(Sc) A currency sign

ModifierSymbol

(Sk) A non-letterlike modifier symbol

OtherSymbol

(So) A symbol of other type

Trait Implementations

The ULE type corresponding to Self. Read more

Converts from Self to Self::ULE. Read more

Converts from Self::ULE to Self. Read more

Returns a TokenStream that would evaluate to self. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Last-resort fallback value to return if we cannot read data from the trie. Read more

A parsing function that is primarily motivated by deserialization contexts. When the serialization type width is smaller than 32 bits, then it is expected that the call site will widen the value to a u32 first. Read more

The container that can be used with this type: ZeroVec or VarZeroVec.

The type produced by Container::get() Read more

The type produced by Container::replace() and Container::remove(), also used during deserialization. If Self is human readable serialized, deserializing to Self::OwnedType should produce the same value once passed through Self::owned_as_self() Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.