[−][src]Struct be_tree::BeTree
A map based on a B๐-tree
Implementations
impl<K, V> BeTree<K, V> where
K: Copy + Ord,
V: Clone,
[src]
K: Copy + Ord,
V: Clone,
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
Auto Trait Implementations
impl<K, V> RefUnwindSafe for BeTree<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for BeTree<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for BeTree<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for BeTree<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for BeTree<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,