Struct Alternation

pub struct Alternation { pub span: Span, pub asts: Vec<Ast> }

An alternation of regular expressions.

Fields

span: Span

The span of this alternation.

asts: Vec<Ast>

The alternate regular expressions.

Implementations

impl Alternation

fn into_ast(self) -> Ast

Return this alternation as an AST.

If this alternation contains zero ASTs, then Ast::empty is returned. If this alternation contains exactly 1 AST, then the corresponding AST is returned. Otherwise, Ast::alternation is returned.

Trait Implementations

impl Clone for Alternation

fn clone(&self) -> Self

impl Debug for Alternation

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

impl Eq for Alternation

impl PartialEq for Alternation

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

impl StructuralPartialEq for Alternation

Auto Trait Implementations

impl Freeze for Alternation

impl RefUnwindSafe for Alternation

impl Send for Alternation

impl Sync for Alternation

impl Unpin for Alternation

impl UnsafeUnpin for Alternation

impl UnwindSafe for Alternation

Blanket Implementations

impl<T> Any for Alternation where T: 'static + ?Sized,

impl<T> Borrow<T> for Alternation where T: ?Sized,

impl<T> BorrowMut<T> for Alternation where T: ?Sized,

impl<T> CloneToUninit for Alternation where T: Clone,

impl<T> From<T> for Alternation

impl<T> ToOwned for Alternation where T: Clone,

impl<T, U> Into<U> for Alternation where U: From<T>,

impl<T, U> TryFrom<U> for Alternation where U: Into<T>,

impl<T, U> TryInto<U> for Alternation where U: TryFrom<T>,