Struct GeneralCategoryGroup
struct GeneralCategoryGroup(_)
Groupings of multiple General_Category property values.
Instances of GeneralCategoryGroup represent the defined multi-category
values that are useful for users in certain contexts, such as regex. In
other words, unlike GeneralCategory, this supports groups of general
categories: for example, Letter /// is the union of UppercaseLetter,
LowercaseLetter, etc.
See https://www.unicode.org/reports/tr44/ .
The discriminants correspond to the U_GC_XX_MASK constants in ICU4C.
Unlike GeneralCategory, this supports groups of general categories: for example, Letter
is the union of UppercaseLetter, LowercaseLetter, etc.
See UCharCategory and U_GET_GC_MASK in ICU4C.
Implementations
impl GeneralCategoryGroup
const fn contains(self: Self, val: GeneralCategory) -> boolReturn whether the code point belongs in the provided multi-value category.
use ; use CodePointMapData; let gc = new; assert_eq!; assert!; // U+0B1E ORIYA LETTER NYA assert_eq!; assert!; assert!; // U+0301 COMBINING ACUTE ACCENT assert_eq!; assert!; assert!; assert_eq!; assert!; assert!; assert_eq!; assert!; assert!; // U+2713 CHECK MARK assert_eq!; assert!; assert!; assert_eq!; assert!; assert!; // U+E007F CANCEL TAG assert_eq!; assert!; assert!;const fn complement(self: Self) -> SelfProduce a GeneralCategoryGroup that is the inverse of this one
Example
use ; let letter = Letter; let not_letter = letter.complement; assert!; assert!; assert!; assert!; assert!; assert!;const fn all() -> SelfReturn the group representing all GeneralCategory values
Example
use ; let all = all; assert!; assert!; assert!;const fn empty() -> SelfReturn the empty group
Example
use ; let empty = empty; assert!; assert!; assert!;const fn union(self: Self, other: Self) -> SelfTake the union of two groups
Example
use ; let letter = Letter; let symbol = Symbol; let union = letter.union; assert!; assert!; assert!;const fn intersection(self: Self, other: Self) -> SelfTake the intersection of two groups
Example
use ; let letter = Letter; let lu = UppercaseLetter; let intersection = letter.intersection; assert!; assert!; assert!; assert!;
impl AsULE for GeneralCategoryGroup
fn to_unaligned(self: Self) -> <Self as >::ULEfn from_unaligned(ule: <Self as >::ULE) -> Self
impl Clone for GeneralCategoryGroup
fn clone(self: &Self) -> GeneralCategoryGroup
impl Copy for GeneralCategoryGroup
impl Debug for GeneralCategoryGroup
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for GeneralCategoryGroup
impl Freeze for GeneralCategoryGroup
impl From for GeneralCategoryGroup
fn from(subcategory: GeneralCategory) -> Self
impl From for GeneralCategoryGroup
fn from(mask: u32) -> Self
impl ParseableEnumeratedProperty for GeneralCategoryGroup
impl PartialEq for GeneralCategoryGroup
fn eq(self: &Self, other: &GeneralCategoryGroup) -> bool
impl RefUnwindSafe for GeneralCategoryGroup
impl Send for GeneralCategoryGroup
impl StructuralPartialEq for GeneralCategoryGroup
impl Sync for GeneralCategoryGroup
impl TrieValue for GeneralCategoryGroup
fn try_from_u32(i: u32) -> Result<Self, <Self as >::TryFromU32Error>fn to_u32(self: Self) -> u32
impl Unpin for GeneralCategoryGroup
impl UnsafeUnpin for GeneralCategoryGroup
impl UnwindSafe for GeneralCategoryGroup
impl<T> Any for GeneralCategoryGroup
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for GeneralCategoryGroup
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for GeneralCategoryGroup
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for GeneralCategoryGroup
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for GeneralCategoryGroup
impl<T> From for GeneralCategoryGroup
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for GeneralCategoryGroup
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for GeneralCategoryGroup
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 GeneralCategoryGroup
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for GeneralCategoryGroup
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>