[][src]Trait adapton::catalog::collections::TreeIntro

pub trait TreeIntro<Lev: Level, Leaf>: Debug + Hash + PartialEq + Eq + Clone + 'static {
    fn nil() -> Self;
fn leaf(_: Leaf) -> Self;
fn bin(_: Lev, _: Self, _: Self) -> Self;
fn name(_: Name, _: Lev, _: Self, _: Self) -> Self;
fn art(_: Art<Self>) -> Self; }

Types that can be created like a (binary) tree with leaves of type Leaf are TreeIntro<Leaf>. We recognize that monoids are a nearly-analogous case; the key differences with monoids are that trees contain names (see name fn) and articulations (see art fn); further, the binary cases name and bin carry levels of type Lev, which helps establish and maintain balance.

Required methods

fn nil() -> Self

fn leaf(_: Leaf) -> Self

fn bin(_: Lev, _: Self, _: Self) -> Self

fn name(_: Name, _: Lev, _: Self, _: Self) -> Self

fn art(_: Art<Self>) -> Self

Loading content...

Implementors

impl<Leaf: Debug + Hash + PartialEq + Eq + Clone + 'static> TreeIntro<usize, Leaf> for Tree<Leaf>[src]

Loading content...