pub struct RbTree<K, V> { /* 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

Constructs a new empty tree.

Returns true if the map is empty.

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.

Inserts a key-value entry into the map.

Removes the specified key from the map.

Trait Implementations

Returns the root hash of the tree without constructing it. Must be equivalent to as_hash_tree().reconstruct(). Read more
Constructs a hash tree corresponding to the data.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Creates a value from an iterator. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
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
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.