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§
Source§impl GeneralCategory
impl GeneralCategory
Sourcepub fn of(ch: char) -> GeneralCategory
pub fn of(ch: char) -> GeneralCategory
Find the GeneralCategory
of a single char.
Source§impl GeneralCategory
impl GeneralCategory
Sourcepub fn is_cased_letter(&self) -> bool
pub fn is_cased_letter(&self) -> bool
Lu
| Ll
| Lt
(Short form: LC
)
Sourcepub fn is_punctuation(&self) -> bool
pub fn is_punctuation(&self) -> bool
Pc
| Pd
| Ps
| Pe
| Pi
| Pf
| Po
(Short form: P
)
Sourcepub fn is_separator(&self) -> bool
pub fn is_separator(&self) -> bool
Zs
| Zl
| Zp
(Short form: Z
)
Trait Implementations§
Source§impl CharProperty for GeneralCategory
impl CharProperty for GeneralCategory
Source§fn prop_abbr_name() -> &'static str
fn prop_abbr_name() -> &'static str
Source§fn prop_long_name() -> &'static str
fn prop_long_name() -> &'static str
Source§fn prop_human_name() -> &'static str
fn prop_human_name() -> &'static str
Source§impl Clone for GeneralCategory
impl Clone for GeneralCategory
Source§fn clone(&self) -> GeneralCategory
fn clone(&self) -> GeneralCategory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GeneralCategory
impl Debug for GeneralCategory
Source§impl Default for GeneralCategory
impl Default for GeneralCategory
Source§fn default() -> GeneralCategory
fn default() -> GeneralCategory
Source§impl Display for GeneralCategory
impl Display for GeneralCategory
Source§impl EnumeratedCharProperty for GeneralCategory
impl EnumeratedCharProperty for GeneralCategory
Source§fn all_values() -> &'static [GeneralCategory]
fn all_values() -> &'static [GeneralCategory]
Source§fn human_name(&self) -> &'static str
fn human_name(&self) -> &'static str
Source§impl FromStr for GeneralCategory
impl FromStr for GeneralCategory
Source§impl Hash for GeneralCategory
impl Hash for GeneralCategory
Source§impl PartialEq for GeneralCategory
impl PartialEq for GeneralCategory
Source§impl TotalCharProperty for GeneralCategory
impl TotalCharProperty for GeneralCategory
Source§fn of(ch: char) -> GeneralCategory
fn of(ch: char) -> GeneralCategory
impl Copy for GeneralCategory
impl Eq for GeneralCategory
impl StructuralPartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)