pub struct Bind<A: AstTypes = DefaultTypes>(pub BindOp, pub Vec<A::Path>, pub Pat<A>, pub Vec<At<Expr<A>, A>>);Expand description
A pattern binding
ⓘ
let Pat (= Expr (else Expr)?)?
type Pat (= Expr)?
fn Pat =? Expr
mod Pat =? Expr
impl Pat =? Expr
struct Pat
enum Pat
for Pat in Expr Expr (else Expr)?Tuple Fields§
§0: BindOp§1: Vec<A::Path>§2: Pat<A>§3: Vec<At<Expr<A>, A>>Trait Implementations§
Source§impl<A: AstTypes, B: AstTypes> Foldable<A, B> for Bind<A>
impl<A: AstTypes, B: AstTypes> Foldable<A, B> for Bind<A>
Source§impl<A: AstTypes> Match<A> for Bind<A>
impl<A: AstTypes> Match<A> for Bind<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 Bind<A>
impl<A: AstTypes> StructuralPartialEq for Bind<A>
Auto Trait Implementations§
impl<A> Freeze for Bind<A>
impl<A> RefUnwindSafe for Bind<A>where
<A as AstTypes>::MacroId: RefUnwindSafe,
<A as AstTypes>::Symbol: RefUnwindSafe,
<A as AstTypes>::Path: RefUnwindSafe,
<A as AstTypes>::Annotation: RefUnwindSafe,
<A as AstTypes>::Literal: RefUnwindSafe,
impl<A> Send for Bind<A>
impl<A> Sync for Bind<A>
impl<A> Unpin for Bind<A>
impl<A> UnwindSafe for Bind<A>where
<A as AstTypes>::MacroId: UnwindSafe,
<A as AstTypes>::Symbol: UnwindSafe,
<A as AstTypes>::Path: UnwindSafe,
<A as AstTypes>::Annotation: 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