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: usize
key_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
Auto Trait Implementations
impl RefUnwindSafe for ColumnarRecordsBuilder
impl Send for ColumnarRecordsBuilder
impl Sync for ColumnarRecordsBuilder
impl Unpin for ColumnarRecordsBuilder
impl UnwindSafe for ColumnarRecordsBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
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