pub trait Algorithm {
type Traversal<'t, L: LanguageExt>: Traversal<'t, StrDoc<L>>;
// Required method
fn traverse<L: LanguageExt>(
node: Node<'_, StrDoc<L>>,
) -> Self::Traversal<'_, L>;
}Expand description
Trait for tree traversal algorithms.
Defines how to create traversal iterators for different algorithms (pre-order, post-order, level-order). Each algorithm has its own traversal implementation with specific visiting order and performance characteristics.
Required Associated Types§
Sourcetype Traversal<'t, L: LanguageExt>: Traversal<'t, StrDoc<L>>
type Traversal<'t, L: LanguageExt>: Traversal<'t, StrDoc<L>>
The specific traversal iterator type for this algorithm
Required Methods§
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.