#[repr(C)]pub enum GeneralCategory {
Show 30 variants
Unassigned = 0,
UppercaseLetter = 1,
LowercaseLetter = 2,
TitlecaseLetter = 3,
ModifierLetter = 4,
OtherLetter = 5,
NonspacingMark = 6,
SpacingMark = 8,
EnclosingMark = 7,
DecimalNumber = 9,
LetterNumber = 10,
OtherNumber = 11,
SpaceSeparator = 12,
LineSeparator = 13,
ParagraphSeparator = 14,
Control = 15,
Format = 16,
PrivateUse = 17,
Surrogate = 18,
DashPunctuation = 19,
OpenPunctuation = 20,
ClosePunctuation = 21,
ConnectorPunctuation = 22,
InitialPunctuation = 28,
FinalPunctuation = 29,
OtherPunctuation = 23,
MathSymbol = 24,
CurrencySymbol = 25,
ModifierSymbol = 26,
OtherSymbol = 27,
}
Variants§
Unassigned = 0
UppercaseLetter = 1
LowercaseLetter = 2
TitlecaseLetter = 3
ModifierLetter = 4
OtherLetter = 5
NonspacingMark = 6
SpacingMark = 8
EnclosingMark = 7
DecimalNumber = 9
LetterNumber = 10
OtherNumber = 11
SpaceSeparator = 12
LineSeparator = 13
ParagraphSeparator = 14
Control = 15
Format = 16
PrivateUse = 17
Surrogate = 18
DashPunctuation = 19
OpenPunctuation = 20
ClosePunctuation = 21
ConnectorPunctuation = 22
InitialPunctuation = 28
FinalPunctuation = 29
OtherPunctuation = 23
MathSymbol = 24
CurrencySymbol = 25
ModifierSymbol = 26
OtherSymbol = 27
Implementations§
Source§impl GeneralCategory
impl GeneralCategory
pub fn for_char(ch: DiplomatChar) -> Self
Sourcepub fn long_name(self) -> Option<&'static str>
pub fn long_name(self) -> Option<&'static str>
Convert to an integer using the ICU4C integer mappings for General_Category
Get the “long” name of this property value (returns empty if property value is unknown)
Sourcepub fn short_name(self) -> Option<&'static str>
pub fn short_name(self) -> Option<&'static str>
Get the “short” name of this property value (returns empty if property value is unknown)
Sourcepub fn to_integer_value(self) -> u8
pub fn to_integer_value(self) -> u8
Convert to an integer value usable with ICU4C and CodePointMapData
Sourcepub fn to_group(self) -> GeneralCategoryGroup
pub fn to_group(self) -> GeneralCategoryGroup
Produces a GeneralCategoryGroup mask that can represent a group of general categories
Sourcepub fn from_integer_value(other: u8) -> Option<Self>
pub fn from_integer_value(other: u8) -> Option<Self>
Convert from an integer using the ICU4C integer mappings for General_Category
Convert from an integer value from ICU4C or CodePointMapData
Trait Implementations§
Source§impl Clone for GeneralCategory
impl Clone for GeneralCategory
Source§fn clone(&self) -> GeneralCategory
fn clone(&self) -> GeneralCategory
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl From<GeneralCategory> for GeneralCategory
impl From<GeneralCategory> for GeneralCategory
Source§fn from(other: GeneralCategory) -> Self
fn from(other: GeneralCategory) -> Self
Converts to this type from the input type.
Source§impl From<GeneralCategory> for GeneralCategory
impl From<GeneralCategory> for GeneralCategory
Source§fn from(this: GeneralCategory) -> Self
fn from(this: GeneralCategory) -> Self
Converts to this type from the input type.
impl Copy for GeneralCategory
Auto Trait Implementations§
impl Freeze for GeneralCategory
impl RefUnwindSafe for GeneralCategory
impl Send for GeneralCategory
impl Sync for GeneralCategory
impl Unpin for GeneralCategory
impl UnwindSafe for GeneralCategory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more