Enum regex_syntax::unicode::ClassQuery [−][src]
pub enum ClassQuery<'a> { OneLetter(char), Binary(&'a str), ByValue { property_name: &'a str, property_value: &'a str, }, }
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
).
Fields of ByValue
property_name: &'a str | A property name. |
property_value: &'a str | A property value. |
Methods
impl<'a> ClassQuery<'a>
[src]
impl<'a> ClassQuery<'a>
fn canonicalize(&self) -> Result<CanonicalClassQuery, Error>
[src]
fn canonicalize(&self) -> Result<CanonicalClassQuery, Error>
fn canonical_binary(&self, name: &str) -> Result<CanonicalClassQuery, Error>
[src]
fn canonical_binary(&self, name: &str) -> Result<CanonicalClassQuery, Error>
Trait Implementations
impl<'a> Debug for ClassQuery<'a>
[src]
impl<'a> Debug for ClassQuery<'a>
Auto Trait Implementations
impl<'a> Send for ClassQuery<'a>
impl<'a> Send for ClassQuery<'a>
impl<'a> Sync for ClassQuery<'a>
impl<'a> Sync for ClassQuery<'a>