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>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§