Struct nebari::tree::VersionedTreeRoot[][src]

pub struct VersionedTreeRoot<EmbeddedIndex> where
    EmbeddedIndex: EmbeddedIndex
{ pub transaction_id: u64, pub sequence: u64, pub by_sequence_root: BTreeEntry<BySequenceIndex, BySequenceStats>, pub by_id_root: BTreeEntry<VersionedByIdIndex<EmbeddedIndex>, ByIdStats<EmbeddedIndex>>, }
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: u64

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

sequence: u64

The last sequence ID inside of this root.

by_sequence_root: BTreeEntry<BySequenceIndex, BySequenceStats>

The by-sequence B-Tree.

by_id_root: BTreeEntry<VersionedByIdIndex<EmbeddedIndex>, ByIdStats<EmbeddedIndex>>

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.

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

Returns the number of values contained in this tree, not including deleted records. 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.

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.

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

Performs the conversion.

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

Performs the conversion.

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