Struct persist::indexed::columnar::ColumnarRecords [−][src]
pub struct ColumnarRecords {
len: usize,
key_data: Buffer<u8>,
key_offsets: Buffer<i32>,
val_data: Buffer<u8>,
val_offsets: Buffer<i32>,
timestamps: Buffer<u64>,
diffs: Buffer<i64>,
}
Expand description
A set of ((Key, Val), Time, Diff) records stored in a columnar representation.
Note that the data are unsorted, and unconsolidated (so there may be multiple instances of the same ((Key, Val), Time), and some Diffs might be zero, or add up to zero).
The i’th key’s data is stored in
key_data[key_offsets[i]..key_offsets[i+1]]
. Similarly for val.
Invariants:
- len < usize::MAX (so len+1 can fit in a usize)
- key_offsets.len() * BYTES_PER_KEY_VAL_OFFSET + key_data.len() <= KEY_VAL_DATA_MAX_LEN
- key_offsets.len() == len + 1
- key_offsets are non-decreasing
- Each key_offset is <= key_data.len()
- key_offsets.first().unwrap() == 0
- key_offsets.last().unwrap() == key_data.len()
- val_offsets.len() * BYTES_PER_KEY_VAL_OFFSET + val_data.len() <= KEY_VAL_DATA_MAX_LEN
- val_offsets.len() == len + 1
- val_offsets are non-decreasing
- Each val_offset is <= val_data.len()
- val_offsets.first().unwrap() == 0
- val_offsets.last().unwrap() == val_data.len()
- timestamps.len() == len
- diffs.len() == len
Fields
len: usize
key_data: Buffer<u8>
key_offsets: Buffer<i32>
val_data: Buffer<u8>
val_offsets: Buffer<i32>
timestamps: Buffer<u64>
diffs: Buffer<i64>
Implementations
The number of (potentially duplicated) ((Key, Val), Time, Diff) records stored in Self.
Borrow Self as a ColumnarRecordsRef.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ColumnarRecords
impl Send for ColumnarRecords
impl Sync for ColumnarRecords
impl Unpin for ColumnarRecords
impl UnwindSafe for ColumnarRecords
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