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.

Scans the tree for keys that are contained within range. If forwards is true, scanning starts at the lowest sort-order key and scans forward. Otherwise, scanning starts at the highest sort-order key and scans backwards. key_evaluator is invoked for each key as it is encountered. For all ScanEvaluation::ReadData results returned, callback will be invoked with the key and values. The callback may not be invoked in the same order as the keys are scanned.

Retrieves the keys and values associated with one or more sequences. The value retrieved is the value of the key at the given SequenceId. If a sequence is not found, it will not appear in the result map. If the value was removed, None is returned for the value.

Retrieves the keys and indexes associated with one or more sequences. The value retrieved is the value of the key at the given SequenceId. If a sequence is not found, it will not appear in the result list.

Retrieves the keys, values, and indexes associated with one or more sequences. The value retrieved is the value of the key at the given SequenceId. If a sequence is not found, it will not appear in the result list.

Sets key to value. Returns the newly created index for this key.

Executes a modification. Returns a list of all changed keys.

Sets key to value. Returns a tuple containing two elements:

  • The previously stored value, if a value was already present.
  • The new/updated index for this key.

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

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

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

Removes key and returns the existing value amd index, 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 the indexes of keys. If any keys are not found, they will be omitted from the results. Keys are required to be pre-sorted.

Retrieves the values and indexes 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.

Retrieves all of the indexes of keys within range.

Retrieves all of the values and indexes 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more