pub struct TransactionTree<Root: Root, File: ManagedFile> { /* private fields */ }
Expand description

A tree that is modifiable during a transaction.

Implementations

Returns the latest sequence id.

Sets key to value.

Executes a modification.

Sets key to value. If a value already exists, it will be returned.

Returns the current value of key. This will return updated information if it has been previously updated within this transaction.

Removes key and returns the existing value, if present.

Compares the value of key against old. If the values match, key will be set to the new value if new is Some or removed if new is None.

Retrieves the values of keys. If any keys are not found, they will be omitted from the results. Keys are required to be pre-sorted.

Retrieves all of the values of keys within range.

Scans the tree across all nodes that might contain nodes within range.

If forwards is true, the tree is scanned in ascending order. Otherwise, the tree is scanned in descending order.

node_evaluator is invoked for each Interior node to determine if the node should be traversed. The parameters to the callback are:

  • &ArcBytes<'static>: The maximum key stored within the all children nodes.
  • &Root::ReducedIndex: The reduced index value stored within the node.
  • usize: The depth of the node. The root nodes are depth 0.

The result of the callback is a ScanEvaluation. To read children nodes, return ScanEvaluation::ReadData.

key_evaluator is invoked for each key encountered that is contained within range. For all ScanEvaluation::ReadData results returned, callback will be invoked with the key and values. callback may not be invoked in the same order as the keys are scanned.

Returns the reduced index over the provided range. This is an aggregation function that builds atop the scan() operation which calls Reducer::reduce() and Reducer::rereduce() on all matching indexes stored within the nodes of this tree, producing a single aggregated Root::ReducedIndex value.

If no keys match, the returned result is what Reducer::rereduce() returns when an empty slice is provided.

Returns the first key of the tree.

Returns the first key and value of the tree.

Returns the last key of the tree.

Returns the last key and value of the tree.

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.

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.