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

Represents the Unicode Character General_Category property.

This is a useful breakdown into various character types which can be used as a default categorization in implementations. For the property values, see General_Category Values.

Variants§

§

UppercaseLetter

An uppercase letter

§

LowercaseLetter

A lowercase letter

§

TitlecaseLetter

A digraphic character, with first part uppercase

§

ModifierLetter

A modifier letter

§

OtherLetter

Other letters, including syllables and ideographs

§

NonspacingMark

A nonspacing combining mark (zero advance width)

§

SpacingMark

A spacing combining mark (positive advance width)

§

EnclosingMark

An enclosing combining mark

§

DecimalNumber

A decimal digit

§

LetterNumber

A letterlike numeric character

§

OtherNumber

A numeric character of other type

§

ConnectorPunctuation

A connecting punctuation mark, like a tie

§

DashPunctuation

A dash or hyphen punctuation mark

§

OpenPunctuation

An opening punctuation mark (of a pair)

§

ClosePunctuation

A closing punctuation mark (of a pair)

§

InitialPunctuation

An initial quotation mark

§

FinalPunctuation

A final quotation mark

§

OtherPunctuation

A punctuation mark of other type

§

MathSymbol

A symbol of mathematical use

§

CurrencySymbol

A currency sign

§

ModifierSymbol

A non-letterlike modifier symbol

§

OtherSymbol

A symbol of other type

§

SpaceSeparator

A space character (of various non-zero widths)

§

LineSeparator

U+2028 LINE SEPARATOR only

§

ParagraphSeparator

U+2029 PARAGRAPH SEPARATOR only

§

Control

A C0 or C1 control code

§

Format

A format control character

§

Surrogate

A surrogate code point

§

PrivateUse

A private-use character

§

Unassigned

Unassigned

Implementations§

Find the GeneralCategory of a single char.

Lu | Ll | Lt (Short form: LC)

Lu | Ll | Lt | Lm | Lo (Short form: L)

Mn | Mc | Me (Short form: M)

Nd | Nl | No (Short form: N)

Pc | Pd | Ps | Pe | Pi | Pf | Po (Short form: P)

Sm | Sc | Sk | So (Short form: S)

Zs | Zl | Zp (Short form: Z)

Cc | Cf | Cs | Co | Cn (Short form: C)

Trait Implementations§

The abbreviated name of the property.
The long name of the property.
The human-readable name of the property.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Exhaustive list of all property values.
The abbreviated name of the property value.
The long name of the property value.
The human-readable name of the property value.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The property value for the character.

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 property value for the character, or None.
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.