Trait Tree

Source
pub trait Tree {
    type Item;

    // Required methods
    fn add(&mut self, key: Self::Item);
    fn delete(&self, key: Self::Item);
    fn find(&self, key: Self::Item) -> Option<&Self>;
}

Required Associated Types§

Required Methods§

Source

fn add(&mut self, key: Self::Item)

adds ‘key’ to the self

Source

fn delete(&self, key: Self::Item)

deletes ‘key’ from ‘self’

Source

fn find(&self, key: Self::Item) -> Option<&Self>

returns the optional subtree containing key

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.

Implementors§