ast_grep_core::traversal

Trait Algorithm

Source
pub trait Algorithm {
    type Traversal<'t, D: 't + Doc>: Traversal<'t, D>;

    // Required method
    fn traverse<D: Doc>(node: Node<'_, D>) -> Self::Traversal<'_, D>;
}

Required Associated Types§

Source

type Traversal<'t, D: 't + Doc>: Traversal<'t, D>

Required Methods§

Source

fn traverse<D: Doc>(node: Node<'_, D>) -> Self::Traversal<'_, D>

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§

Source§

impl Algorithm for PostOrder

Source§

type Traversal<'t, D: 't + Doc> = Post<'t, D>

Source§

impl Algorithm for PreOrder

Source§

type Traversal<'t, D: 't + Doc> = Pre<'t, D>