Enum GeneralCategory
enum GeneralCategory
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.
Example
use ;
assert_eq!; // U+6728
assert_eq!; // U+1F383 JACK-O-LANTERN
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
Implementations
impl GeneralCategory
impl AsULE for GeneralCategory
fn to_unaligned(self: Self) -> <Self as >::ULEfn from_unaligned(other: <Self as >::ULE) -> Self
impl Clone for GeneralCategory
fn clone(self: &Self) -> GeneralCategory
impl Copy for GeneralCategory
impl Debug for GeneralCategory
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl EnumeratedProperty for GeneralCategory
impl Eq for GeneralCategory
impl Freeze for GeneralCategory
impl Hash for GeneralCategory
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl NamedEnumeratedProperty for GeneralCategory
impl Ord for GeneralCategory
fn cmp(self: &Self, other: &GeneralCategory) -> Ordering
impl ParseableEnumeratedProperty for GeneralCategory
impl PartialEq for GeneralCategory
fn eq(self: &Self, other: &GeneralCategory) -> bool
impl PartialOrd for GeneralCategory
fn partial_cmp(self: &Self, other: &GeneralCategory) -> Option<Ordering>
impl RefUnwindSafe for GeneralCategory
impl Send for GeneralCategory
impl StructuralPartialEq for GeneralCategory
impl Sync for GeneralCategory
impl TrieValue for GeneralCategory
fn try_from_u32(i: u32) -> Result<Self, <Self as >::TryFromU32Error>fn to_u32(self: Self) -> u32
impl TryFrom for GeneralCategory
fn try_from(val: u8) -> Result<Self, GeneralCategoryOutOfBoundsError>Construct this
GeneralCategoryfrom an integer, returning an error if it is out of bounds
impl Unpin for GeneralCategory
impl UnsafeUnpin for GeneralCategory
impl UnwindSafe for GeneralCategory
impl<'a> ZeroMapKV for GeneralCategory
impl<T> Any for GeneralCategory
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for GeneralCategory
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for GeneralCategory
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for GeneralCategory
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for GeneralCategory
impl<T> From for GeneralCategory
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for GeneralCategory
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for GeneralCategory
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for GeneralCategory
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for GeneralCategory
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>