pub trait LayoutTreeVisitor<T: LayoutTreeNode> {
// Required methods
fn parent(&self) -> Option<&T>;
fn for_each_child<'a, 'b: 'a, F>(&'b self, f: F)
where F: FnMut(&'a T, usize),
T: 'a;
fn children_len(&self) -> usize;
fn child_at(&self, index: usize) -> Option<&T>;
}Expand description
A helper type for tree traversal.
Required Methods§
Sourcefn for_each_child<'a, 'b: 'a, F>(&'b self, f: F)
fn for_each_child<'a, 'b: 'a, F>(&'b self, f: F)
Get child nodes.
Sourcefn children_len(&self) -> usize
fn children_len(&self) -> usize
Get the count of child nodes.
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.