[][src]Struct be_tree::BeTree

pub struct BeTree<K, V> { /* fields omitted */ }

A map based on a B๐›†-tree

Implementations

impl<K, V> BeTree<K, V> where
    K: Copy + Ord,
    V: Clone
[src]

pub fn new() -> Self[src]

Create an empty B๐›†-tree.

pub fn clear(&mut self)[src]

Clear the tree, removing all entries.

pub fn insert(&mut self, key: K, value: V)[src]

Insert a key-value pair into the tree.

If the key is already present in the tree, the value is replaced. The key is not updated, though; this matters for types that can be == without being identical.

pub fn delete(&mut self, key: K)[src]

Remove a key (and its value) from the tree.

If the key is not present, silently does nothing.

pub fn get(&self, key: K) -> Option<&V>[src]

Retrieve a reference to the value corresponding to the key.

Trait Implementations

impl<K, V> Default for BeTree<K, V> where
    K: Copy + Ord,
    V: Clone
[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for BeTree<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for BeTree<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for BeTree<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for BeTree<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for BeTree<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.