pub struct MakeArm<A: AstTypes = DefaultTypes>(pub A::Symbol, pub Option<At<Expr<A>, A>>);Expand description
A single “arm” of a make expression
Identifier (':' Expr)?Tuple Fields§
§0: A::Symbol§1: Option<At<Expr<A>, A>>Trait Implementations§
Source§impl<A: AstTypes, B: AstTypes> Foldable<A, B> for MakeArm<A>
impl<A: AstTypes, B: AstTypes> Foldable<A, B> for MakeArm<A>
Source§impl<A: AstTypes> Match<A> for MakeArm<A>
impl<A: AstTypes> Match<A> for MakeArm<A>
Source§fn recurse(sub: &mut Subst<A>, pat: &Self, expr: &Self) -> bool
fn recurse(sub: &mut Subst<A>, pat: &Self, expr: &Self) -> bool
Implements recursive Subst-building for Self
Source§fn apply_rule(&mut self, pat: &Self, template: &Self) -> bool
fn apply_rule(&mut self, pat: &Self, template: &Self) -> bool
Applies a substitution rule from
pat to template on selfSource§fn match_with(&self, pat: &Self) -> Option<Subst<A>>
fn match_with(&self, pat: &Self) -> Option<Subst<A>>
Matches self against the provided pattern
impl<A: Eq + AstTypes> Eq for MakeArm<A>
impl<A: AstTypes> StructuralPartialEq for MakeArm<A>
Auto Trait Implementations§
impl<A> Freeze for MakeArm<A>
impl<A> RefUnwindSafe for MakeArm<A>where
<A as AstTypes>::Symbol: RefUnwindSafe,
<A as AstTypes>::Annotation: RefUnwindSafe,
<A as AstTypes>::Path: RefUnwindSafe,
<A as AstTypes>::MacroId: RefUnwindSafe,
<A as AstTypes>::Literal: RefUnwindSafe,
impl<A> Send for MakeArm<A>
impl<A> Sync for MakeArm<A>
impl<A> Unpin for MakeArm<A>
impl<A> UnwindSafe for MakeArm<A>where
<A as AstTypes>::Symbol: UnwindSafe,
<A as AstTypes>::Annotation: UnwindSafe,
<A as AstTypes>::Path: UnwindSafe,
<A as AstTypes>::MacroId: UnwindSafe,
<A as AstTypes>::Literal: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more