pub(crate) fn matching<'b>(
        &'b self,
        element: SyntaxElement,
    ) -> impl Iterator<Item = &'a P> + 'b {
        self.by_kind
            .get(&element.kind())
            .into_iter()
            .flat_map(|vec| vec.iter())
            .chain(self.unconstrained.iter())
            .copied()
            .filter(move |p| p.as_ref().matches(&element))
    }
/// Returns an iterator of patterns that match
Returns an iterator of patterns that match
Returns an iterator of patterns that match
pub(crate) fn matching<'b>(
        &'b self,
        element: SyntaxElement,
    ) -> impl Iterator<Item = &'a P> + 'b {
        self.by_kind
            .get(&element.kind())
            .into_iter()
            .flat_map(|vec| vec.iter())
            .chain(self.unconstrained.iter())
            .copied()
            .filter(move |p| p.as_ref().matches(&element))
    }
pub ( crate ) fn matching < ' b > ( & ' b self , element : SyntaxElement , ) -> impl Iterator < Item = & ' a P > + ' b { self . by_kind . get ( & element . kind ( ) ) . into_iter ( ) . flat_map ( | vec | vec . iter ( ) ) . chain ( self . unconstrained . iter ( ) ) . copied ( ) . filter ( move | p | p . as_ref ( ) . matches ( & element ) ) }
Returns an iterator of patterns that match
Returns an iterator of patterns that match
&'b self
element
SyntaxElement