pub trait Node {
type Value;
// Required methods
fn left(&self) -> Option<&Self>;
fn right(&self) -> Option<&Self>;
fn value(&self) -> &Self::Value;
// Provided method
fn walk<'a, F>(&'a self, step_in: F)
where F: FnMut(&'a Self) -> WalkAction { ... }
}
Expand description
Generic methods for traversing a binary tree.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn walk<'a, F>(&'a self, step_in: F)where
F: FnMut(&'a Self) -> WalkAction,
fn walk<'a, F>(&'a self, step_in: F)where
F: FnMut(&'a Self) -> WalkAction,
Walk down the tree
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.