Skip to main content

TreeDisplayContext

Trait TreeDisplayContext 

Source
pub trait TreeDisplayContext<N: ?Sized> {
    // Provided methods
    fn push_parent(&mut self, parent: &N) { ... }
    fn pop_parent(&mut self, parent: &N) { ... }
}
Expand description

Traversal state updated as a tree renderer enters and leaves a node’s children.

The context visible while a node is rendered describes its ancestors. The renderer calls Self::push_parent before visiting the node’s children and Self::pop_parent afterwards.

Provided Methods§

Source

fn push_parent(&mut self, parent: &N)

Record parent while its children are visited.

Source

fn pop_parent(&mut self, parent: &N)

Remove parent after all of its children have been visited.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<N: ?Sized> TreeDisplayContext<N> for ()

Implementors§