Struct ic_certified_map::RbTree
source ·
[−]pub struct RbTree<K: 'static + AsRef<[u8]>, V: AsHashTree + 'static> { /* private fields */ }
Expand description
Implements mutable left-leaning red-black trees as defined in https://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf
Implementations
Updates the value corresponding to the specified key.
Constructs a hash tree that acts as a proof that there is a entry with the specified key in this map. The proof also contains the value in question.
If the key is not in the map, returns a proof of absence.
Like witness
, but gives the caller more control over the
construction of the value witness. This method is useful for
constructing witnesses for nested certified maps.
Returns a witness enumerating all the keys in this map. The resulting tree doesn’t include values, they are replaced with “Pruned” nodes.
Returns a witness for the keys in the specified range. The resulting tree doesn’t include values, they are replaced with “Pruned” nodes.
Returns a witness for the key-value pairs in the specified range. The resulting tree contains both keys and values.
Returns a witness that enumerates all the keys starting with the specified prefix.
Enumerates all the key-value pairs in the tree.
Trait Implementations
impl<K, V> FromIterator<(K, V)> for RbTree<K, V> where
K: 'static + AsRef<[u8]>,
V: 'static + AsHashTree,
impl<K, V> FromIterator<(K, V)> for RbTree<K, V> where
K: 'static + AsRef<[u8]>,
V: 'static + AsHashTree,
impl<K, V> PartialOrd<RbTree<K, V>> for RbTree<K, V> where
K: 'static + AsRef<[u8]> + PartialOrd,
V: 'static + AsHashTree + PartialOrd,
impl<K, V> PartialOrd<RbTree<K, V>> for RbTree<K, V> where
K: 'static + AsRef<[u8]> + PartialOrd,
V: 'static + AsHashTree + PartialOrd,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<K, V> RefUnwindSafe for RbTree<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> UnwindSafe for RbTree<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more