Struct persist::indexed::columnar::ColumnarRecordsBuilder[][src]

pub struct ColumnarRecordsBuilder {
    len: usize,
    key_data: MutableBuffer<u8>,
    key_offsets: MutableBuffer<i32>,
    val_data: MutableBuffer<u8>,
    val_offsets: MutableBuffer<i32>,
    timestamps: MutableBuffer<u64>,
    diffs: MutableBuffer<i64>,
}
Expand description

An abstraction to incrementally add ((Key, Value), Time, Diff) records in a columnar representation, and eventually get back a ColumnarRecords.

Fields

len: usizekey_data: MutableBuffer<u8>key_offsets: MutableBuffer<i32>val_data: MutableBuffer<u8>val_offsets: MutableBuffer<i32>timestamps: MutableBuffer<u64>diffs: MutableBuffer<i64>

Implementations

The number of (potentially duplicated) ((Key, Val), Time, Diff) records stored in Self.

Borrow Self as a ColumnarRecordsRef.

Reserve space for additional more records, based on key_size_guess and val_size_guess.

The guesses for key and val sizes are best effort, and if they end up being too small, the underlying buffers will be resized.

Returns if the given key_offsets+key_data or val_offsets+val_data fits in the limits imposed by ColumnarRecords.

Note that limit is always KEY_VAL_DATA_MAX_LEN in production. It’s only override-able here for testing.

Add a record to Self.

Returns whether the record was successfully added. A record will not a added if it exceeds the size limitations of ColumnarBatch. This method is atomic, if it fails, no partial data will have been added.

Finalize constructing a ColumnarRecords.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

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.

Should always be Self

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