Struct ast_grep_core::ops::And
source · Trait Implementations
sourceimpl<L: Language, P1, P2> Matcher<L> for And<L, P1, P2>where
P1: Matcher<L>,
P2: Matcher<L>,
impl<L: Language, P1, P2> Matcher<L> for And<L, P1, P2>where
P1: Matcher<L>,
P2: Matcher<L>,
sourcefn match_node_with_env<'tree>(
&self,
node: Node<'tree, L>,
env: &mut MetaVarEnv<'tree, L>
) -> Option<Node<'tree, L>>
fn match_node_with_env<'tree>(
&self,
node: Node<'tree, L>,
env: &mut MetaVarEnv<'tree, L>
) -> Option<Node<'tree, L>>
Returns the node why the input is matched or None if not matched.
The return value is usually input node itself, but it can be different node.
For example
Has matcher can return the child or descendant node. Read morefn match_node<'tree>(&self, node: Node<'tree, L>) -> Option<NodeMatch<'tree, L>>
fn get_meta_var_matchers(&self) -> MetaVarMatchers<L>
fn get_meta_var_env<'tree>(&self) -> MetaVarEnv<'tree, L>
fn find_node_with_env<'tree>(
&self,
node: Node<'tree, L>,
env: &mut MetaVarEnv<'tree, L>
) -> Option<Node<'tree, L>>
fn find_node<'tree>(&self, node: Node<'tree, L>) -> Option<NodeMatch<'tree, L>>
fn find_all_nodes(self, node: Node<'_, L>) -> FindAllNodes<'_, L, Self>where
Self: Sized,
impl<L: Language, P1, P2> PositiveMatcher<L> for And<L, P1, P2>where
P1: PositiveMatcher<L>,
P2: Matcher<L>,
Auto Trait Implementations
impl<L, P1, P2> RefUnwindSafe for And<L, P1, P2>where
L: RefUnwindSafe,
P1: RefUnwindSafe,
P2: RefUnwindSafe,
impl<L, P1, P2> Send for And<L, P1, P2>where
L: Send,
P1: Send,
P2: Send,
impl<L, P1, P2> Sync for And<L, P1, P2>where
L: Sync,
P1: Sync,
P2: Sync,
impl<L, P1, P2> Unpin for And<L, P1, P2>where
L: Unpin,
P1: Unpin,
P2: Unpin,
impl<L, P1, P2> UnwindSafe for And<L, P1, P2>where
L: UnwindSafe,
P1: UnwindSafe,
P2: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more