Trait AstLeafNodePattern

Source
pub trait AstLeafNodePattern<Q: QueryContext>:
    Clone
    + Debug
    + Matcher<Q>
    + PatternName
    + Sized {
    // Provided method
    fn text(&self) -> Option<&str> { ... }
}
Expand description

Type of pattern that matches against an individual AST leaf node.

Provided Methods§

Source

fn text(&self) -> Option<&str>

Provides a possible text value for the leaf node. This is not mandatory, but enables some advanced functionality.

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§