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: usizekey_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.

Iterate through the records in Self.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

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