Struct ClassSetUnion
struct ClassSetUnion { ... }
A union of items inside a character class set.
Fields
span: SpanThe span of the items in this operation. e.g., the
a-z0-9in[^a-z0-9]items: Vec<ClassSetItem>The sequence of items that make up this union.
Implementations
impl ClassSetUnion
fn push(self: &mut Self, item: ClassSetItem)Push a new item in this union.
The ending position of this union's span is updated to the ending position of the span of the item given. If the union is empty, then the starting position of this union is set to the starting position of this item.
In other words, if you only use this method to add items to a union and you set the spans on each item correctly, then you should never need to adjust the span of the union directly.
fn into_item(self: Self) -> ClassSetItemReturn this union as a character class set item.
If this union contains zero items, then an empty union is returned. If this concatenation contains exactly 1 item, then the corresponding item is returned. Otherwise, ClassSetItem::Union is returned.
impl Clone for ClassSetUnion
fn clone(self: &Self) -> ClassSetUnion
impl Debug for ClassSetUnion
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for ClassSetUnion
impl Freeze for ClassSetUnion
impl PartialEq for ClassSetUnion
fn eq(self: &Self, other: &ClassSetUnion) -> bool
impl RefUnwindSafe for ClassSetUnion
impl Send for ClassSetUnion
impl StructuralPartialEq for ClassSetUnion
impl Sync for ClassSetUnion
impl Unpin for ClassSetUnion
impl UnsafeUnpin for ClassSetUnion
impl UnwindSafe for ClassSetUnion
impl<T> Any for ClassSetUnion
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ClassSetUnion
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ClassSetUnion
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for ClassSetUnion
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for ClassSetUnion
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for ClassSetUnion
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for ClassSetUnion
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 ClassSetUnion
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ClassSetUnion
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>