Struct ClassUnicode
pub struct ClassUnicode { pub span: Span, pub negated: bool, pub kind: ClassUnicodeKind }
A Unicode character class.
Fields
span: SpanThe span of this class.
negated: boolWhether this class is negated or not.
Note: be careful when using this attribute. This specifically refers to whether the class is written as
\por\P, where the latter isnegated = true. However, it also possible to write something like\P{scx!=Katakana}which is actually equivalent to\p{scx=Katakana}and is therefore not actually negated even thoughnegated = truehere. To test whether this class is truly negated or not, use theis_negatedmethod.kind: ClassUnicodeKindThe kind of Unicode class.
Implementations
impl ClassUnicode
fn is_negated(&self) -> boolReturns true if this class has been negated.
Note that this takes the Unicode op into account, if it's present. e.g.,
is_negatedfor\P{scx!=Katakana}will returnfalse.
Trait Implementations
impl Clone for ClassUnicode
fn clone(&self) -> Self
impl Debug for ClassUnicode
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for ClassUnicode
impl PartialEq for ClassUnicode
fn eq(&self, other: &Self) -> bool