pub struct Make<A: AstTypes = DefaultTypes>(pub At<Expr<A>, A>, pub Vec<MakeArm<A>>);Expand description
A make (constructor) expression
ⓘ
Expr { (Ident (: Expr)?),* }Tuple Fields§
§0: At<Expr<A>, A>§1: Vec<MakeArm<A>>Trait Implementations§
Source§impl<A: AstTypes, B: AstTypes> Foldable<A, B> for Make<A>
impl<A: AstTypes, B: AstTypes> Foldable<A, B> for Make<A>
Source§impl<A: AstTypes> Match<A> for Make<A>
impl<A: AstTypes> Match<A> for Make<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 Make<A>
impl<A: AstTypes> StructuralPartialEq for Make<A>
Auto Trait Implementations§
impl<A> Freeze for Make<A>
impl<A> RefUnwindSafe for Make<A>where
<A as AstTypes>::Annotation: RefUnwindSafe,
<A as AstTypes>::Path: RefUnwindSafe,
<A as AstTypes>::MacroId: RefUnwindSafe,
<A as AstTypes>::Literal: RefUnwindSafe,
<A as AstTypes>::Symbol: RefUnwindSafe,
impl<A> Send for Make<A>
impl<A> Sync for Make<A>
impl<A> Unpin for Make<A>
impl<A> UnwindSafe for Make<A>where
<A as AstTypes>::Annotation: UnwindSafe,
<A as AstTypes>::Path: UnwindSafe,
<A as AstTypes>::MacroId: UnwindSafe,
<A as AstTypes>::Literal: UnwindSafe,
<A as AstTypes>::Symbol: 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