Enum icu::properties::GeneralCategory
source · [−]#[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
sourceimpl AsULE for GeneralCategory
impl AsULE for GeneralCategory
sourcefn to_unaligned(self) -> <GeneralCategory as AsULE>::ULE
fn to_unaligned(self) -> <GeneralCategory as AsULE>::ULE
Converts from Self
to Self::ULE
. Read more
sourcefn from_unaligned(other: <GeneralCategory as AsULE>::ULE) -> GeneralCategory
fn from_unaligned(other: <GeneralCategory as AsULE>::ULE) -> GeneralCategory
Converts from Self::ULE
to Self
. Read more
sourceimpl Bake for GeneralCategory
impl Bake for GeneralCategory
sourcefn bake(&self, env: &CrateEnv) -> TokenStream
fn bake(&self, env: &CrateEnv) -> TokenStream
Returns a TokenStream
that would evaluate to self
. Read more
sourceimpl Clone for GeneralCategory
impl Clone for GeneralCategory
sourcefn clone(&self) -> GeneralCategory
fn clone(&self) -> GeneralCategory
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GeneralCategory
impl Debug for GeneralCategory
sourceimpl<'de> Deserialize<'de> for GeneralCategory
impl<'de> Deserialize<'de> for GeneralCategory
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<GeneralCategory, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<GeneralCategory, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<GeneralCategory> for GeneralCategoryGroup
impl From<GeneralCategory> for GeneralCategoryGroup
sourcefn from(subcategory: GeneralCategory) -> GeneralCategoryGroup
fn from(subcategory: GeneralCategory) -> GeneralCategoryGroup
Converts to this type from the input type.
sourceimpl Ord for GeneralCategory
impl Ord for GeneralCategory
sourceimpl PartialEq<GeneralCategory> for GeneralCategory
impl PartialEq<GeneralCategory> for GeneralCategory
sourceimpl PartialOrd<GeneralCategory> for GeneralCategory
impl PartialOrd<GeneralCategory> for GeneralCategory
sourcefn partial_cmp(&self, other: &GeneralCategory) -> Option<Ordering>
fn partial_cmp(&self, other: &GeneralCategory) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for GeneralCategory
impl Serialize for GeneralCategory
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl TrieValue for GeneralCategory
impl TrieValue for GeneralCategory
type TryFromU32Error = &'static str
type TryFromU32Error = &'static str
Last-resort fallback value to return if we cannot read data from the trie. Read more
sourcefn try_from_u32(
i: u32
) -> Result<GeneralCategory, <GeneralCategory as TrieValue>::TryFromU32Error>
fn try_from_u32(
i: u32
) -> Result<GeneralCategory, <GeneralCategory as TrieValue>::TryFromU32Error>
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
sourceimpl<'a> ZeroMapKV<'a> for GeneralCategory
impl<'a> ZeroMapKV<'a> for GeneralCategory
type Container = ZeroVec<'a, GeneralCategory>
type Container = ZeroVec<'a, GeneralCategory>
The container that can be used with this type: ZeroVec
or VarZeroVec
.
type Slice = ZeroSlice<GeneralCategory>
type OwnedType = GeneralCategory
type OwnedType = GeneralCategory
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
impl Copy for GeneralCategory
impl Eq for GeneralCategory
impl StructuralEq for GeneralCategory
impl StructuralPartialEq for GeneralCategory
Auto Trait Implementations
impl RefUnwindSafe for GeneralCategory
impl Send for GeneralCategory
impl Sync for GeneralCategory
impl Unpin for GeneralCategory
impl UnwindSafe for GeneralCategory
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Serialize for T where
T: Serialize + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more