pub struct ExprMatcher<'p> { /* private fields */ }Expand description
Pattern matcher for expressions
Implementations§
Source§impl<'p> ExprMatcher<'p>
impl<'p> ExprMatcher<'p>
Sourcepub fn new(pattern: &'p CodePattern) -> Self
pub fn new(pattern: &'p CodePattern) -> Self
Construct a new ExprMatcher borrowing the given pattern.
Sourcepub fn matches(&self, expr: &PureExpr) -> Option<MatchContext>
pub fn matches(&self, expr: &PureExpr) -> Option<MatchContext>
Match against a PureExpr
Auto Trait Implementations§
impl<'p> Freeze for ExprMatcher<'p>
impl<'p> RefUnwindSafe for ExprMatcher<'p>
impl<'p> Send for ExprMatcher<'p>
impl<'p> Sync for ExprMatcher<'p>
impl<'p> Unpin for ExprMatcher<'p>
impl<'p> UnsafeUnpin for ExprMatcher<'p>
impl<'p> UnwindSafe for ExprMatcher<'p>
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