Skip to main content

Tree

Trait Tree 

Source
pub trait Tree: Node {
    type Children<'c>: 'c + IntoIterator<Item = &'c Self>
       where Self: 'c;

    // Required method
    fn children(&self) -> Self::Children<'_>;
}
Expand description

An abstraction for a recursive tree.

Required Associated Types§

Source

type Children<'c>: 'c + IntoIterator<Item = &'c Self> where Self: 'c

A type that can iterate over this Tree’s children.

Required Methods§

Source

fn children(&self) -> Self::Children<'_>

Returns this Tree’s immediate children.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§