pub struct BTree<K: Ord + Clone + Debug, V: Clone + Debug> {
root: Option<Box<Node<K, V>>>,
}
Fields§
§root: Option<Box<Node<K, V>>>
Implementations§
source§impl<K: Ord + Clone + Debug, V: Clone + Debug> BTree<K, V>
impl<K: Ord + Clone + Debug, V: Clone + Debug> BTree<K, V>
pub fn new() -> Self
pub fn print(&self)
pub fn traverse(&self) -> Vec<(K, V)>
fn dfs(node: &Node<K, V>, kv_pairs: &mut Vec<(K, V)>)
pub fn insert(&mut self, key: K, value: V)
pub fn delete(&mut self, key: &K) -> Option<V>
pub fn search(&self, key: &K) -> Option<&V>
pub fn print_tree(&self)
Trait Implementations§
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for BTree<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for BTree<K, V>
impl<K, V> Sync for BTree<K, V>
impl<K, V> Unpin for BTree<K, V>
impl<K, V> UnwindSafe for BTree<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more