grit_pattern_matcher::pattern

Trait CodeSnippet

source
pub trait CodeSnippet<Q: QueryContext + 'static>:
    Clone
    + Debug
    + Matcher<Q>
    + PatternName {
    // Required methods
    fn patterns(&self) -> impl Iterator<Item = &Pattern<Q>>;
    fn dynamic_snippet(&self) -> Option<&DynamicPattern<Q>>;
}

Required Methods§

source

fn patterns(&self) -> impl Iterator<Item = &Pattern<Q>>

Return the different patterns which could all possibly match the code snippet.

source

fn dynamic_snippet(&self) -> Option<&DynamicPattern<Q>>

Object Safety§

This trait is not object safe.

Implementors§