Enum regex_syntax::unicode::ClassQuery
source · pub enum ClassQuery<'a> {
OneLetter(char),
Binary(&'a str),
ByValue {
property_name: &'a str,
property_value: &'a str,
},
}
Expand description
A query for finding a character class defined by Unicode. This supports either use of a property name directly, or lookup by property value. The former generally refers to Binary properties (see UTS#44, Table 8), but as a special exception (see UTS#18, Section 1.2) both general categories (an enumeration) and scripts (a catalog) are supported as if each of their possible values were a binary property.
In all circumstances, property names and values are normalized and
canonicalized. That is, GC == gc == GeneralCategory == general_category
.
The lifetime 'a
refers to the shorter of the lifetimes of property name
and property value.
Variants§
OneLetter(char)
Return a class corresponding to a Unicode binary property, named by a single letter.
Binary(&'a str)
Return a class corresponding to a Unicode binary property.
Note that, by special exception (see UTS#18, Section 1.2), both general category values and script values are permitted here as if they were a binary property.
ByValue
Return a class corresponding to all codepoints whose property
(identified by property_name
) corresponds to the given value
(identified by property_value
).