pub enum NestedTree<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> {
Leaf(V),
Nested(RbTree<K, NestedTree<K, V>>),
}Variants§
Leaf(V)
Nested(RbTree<K, NestedTree<K, V>>)
Implementations§
Source§impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> NestedTree<K, V>
impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> NestedTree<K, V>
pub fn get(&self, path: &[K]) -> Option<&V>
Sourcepub fn contains_leaf(&self, path: &[K]) -> bool
pub fn contains_leaf(&self, path: &[K]) -> bool
Returns true if there is a leaf at the specified path
Sourcepub fn contains_path(&self, path: &[K]) -> bool
pub fn contains_path(&self, path: &[K]) -> bool
Returns true if there is a leaf or a subtree at the specified path
pub fn insert(&mut self, path: &[K], value: V)
pub fn delete(&mut self, path: &[K])
pub fn clear(&mut self)
pub fn witness(&self, path: &[K]) -> HashTree
Trait Implementations§
Source§impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> AsHashTree for NestedTree<K, V>
impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> AsHashTree for NestedTree<K, V>
Source§impl<K: Clone + NestedTreeKeyRequirements, V: Clone + NestedTreeValueRequirements> Clone for NestedTree<K, V>
impl<K: Clone + NestedTreeKeyRequirements, V: Clone + NestedTreeValueRequirements> Clone for NestedTree<K, V>
Source§impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> Debug for NestedTree<K, V>
impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> Debug for NestedTree<K, V>
Source§impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> Default for NestedTree<K, V>
impl<K: NestedTreeKeyRequirements, V: NestedTreeValueRequirements> Default for NestedTree<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for NestedTree<K, V>
impl<K, V> RefUnwindSafe for NestedTree<K, V>
impl<K, V> Send for NestedTree<K, V>
impl<K, V> Sync for NestedTree<K, V>
impl<K, V> Unpin for NestedTree<K, V>
impl<K, V> UnsafeUnpin for NestedTree<K, V>
impl<K, V> UnwindSafe for NestedTree<K, V>
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