Trait bin_tree::IteratorEx

source ·
pub trait IteratorEx: Iterator + Sized
where Self::Item: Node,
{ // Provided method fn build_tree(self) -> Option<Self::Item> { ... } }
Expand description

The trait extends the functionality of the standard Iterator trait by adding the build_tree method.

Provided Methods§

source

fn build_tree(self) -> Option<Self::Item>

Builds a binary tree from an iterator of Nodes

§Arguments
  • self - the iterator of Nodes to build the tree from
§Return

The root node of the built tree, if it was successfully built.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Iterator> IteratorEx for T
where T::Item: Node,