pub struct UnversionedTreeRoot<Index> where
    Index: Clone + EmbeddedIndex + Debug + 'static, 
{ pub transaction_id: Option<TransactionId>, pub by_id_root: BTreeEntry<UnversionedByIdIndex<Index>, ByIdStats<Index::Reduced>>, /* private fields */ }
Expand description

A versioned B-Tree root. This tree root internally uses two btrees, one to keep track of all writes using a unique “sequence” ID, and one that keeps track of all key-value pairs.

Fields

transaction_id: Option<TransactionId>

The transaction ID of the tree root. If this transaction ID isn’t present in the transaction log, this root should not be trusted.

by_id_root: BTreeEntry<UnversionedByIdIndex<Index>, ByIdStats<Index::Reduced>>

The by-id B-Tree.

Trait Implementations

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

The unique header byte for this root.

The primary index type contained within this root.

The primary index type contained within this root.

The reducer that reduces Indexes and re-reduces ReducedIndexes.

Returns a new instance with the provided reducer.

Returns the instance’s reducer.

Returns the number of values contained in this tree, not including deleted records. Read more

Returns true if the tree is initialized.

Returns true if the root needs to be saved.

Resets the state to the default, initialized state. After calling this, Self::initialized() will return true. Read more

Deserializes the root from bytes.

Serialize the root and return the bytes. Writes any additional data to paged_writer in the process of serialization. Read more

Returns the current transaction id.

Modifies the tree. Returns a list of modified keys and their updated indexes, if the keys are still present. Read more

Iterates over the tree looking for keys. keys must be sorted. key_evaluator is invoked for each key as it is found, allowing for decisions on how to handle each key. key_reader will be invoked for each key that is requested to be read, but it might be invoked at a later time and in a different order. Read more

Scans the tree over range. args.key_evaluator is invoked for each key as it is found, allowing for decisions on how to handle each key. args.key_reader will be invoked for each key that is requested to be read, but it might be invoked at a later time and in a different order. Read more

Copies all data from file into writer, updating self with the new file positions. Read more

Returns a reference to a named tree that contains this type of root.

Returns a reference to a named tree that contains this type of root.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.

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