Struct ClassUnicode

struct ClassUnicode { ... }

A Unicode character class.

Fields

span: Span

The span of this class.

negated: bool

Whether this class is negated or not.

Note: be careful when using this attribute. This specifically refers to whether the class is written as \p or \P, where the latter is negated = 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 though negated = true here. To test whether this class is truly negated or not, use the is_negated method.

kind: ClassUnicodeKind

The kind of Unicode class.

Implementations

impl ClassUnicode

fn is_negated(self: &Self) -> bool

Returns true if this class has been negated.

Note that this takes the Unicode op into account, if it's present. e.g., is_negated for \P{scx!=Katakana} will return false.

impl Clone for ClassUnicode

fn clone(self: &Self) -> ClassUnicode

impl Debug for ClassUnicode

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for ClassUnicode

impl Freeze for ClassUnicode

impl PartialEq for ClassUnicode

fn eq(self: &Self, other: &ClassUnicode) -> bool

impl RefUnwindSafe for ClassUnicode

impl Send for ClassUnicode

impl StructuralPartialEq for ClassUnicode

impl Sync for ClassUnicode

impl Unpin for ClassUnicode

impl UnsafeUnpin for ClassUnicode

impl UnwindSafe for ClassUnicode

impl<T> Any for ClassUnicode

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ClassUnicode

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ClassUnicode

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for ClassUnicode

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for ClassUnicode

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for ClassUnicode

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for ClassUnicode

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ClassUnicode

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ClassUnicode

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>