Struct Alternation
pub struct Alternation { pub span: Span, pub asts: Vec<Ast> }
An alternation of regular expressions.
Fields
span: SpanThe span of this alternation.
asts: Vec<Ast>The alternate regular expressions.
Implementations
impl Alternation
fn into_ast(self) -> AstReturn this alternation as an AST.
If this alternation contains zero ASTs, then
Ast::emptyis returned. If this alternation contains exactly 1 AST, then the corresponding AST is returned. Otherwise,Ast::alternationis 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,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Alternation
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Alternation
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Alternation
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Alternation
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Alternation
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Alternation
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Alternation
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Alternation
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>