Expand description
Packed event-sequence encoding used by bitmap index storage.
The public cursor/query layers use (tx_seq, event_index). Bitmap storage
packs that coordinate into event_seq = (tx_seq << EVENT_BITS) | event_idx.
Constants§
- EVENT_
BITS - Number of low bits of
event_seqreserved for the per-tx event index. - MAX_
EVENTS_ PER_ TX - Maximum number of events per tx representable in a packed event_seq.
- MAX_
TX_ SEQ - Maximum tx_seq representable in a packed event_seq.
Functions§
- decode_
event_ seq - Unpack a packed event_seq back into
(tx_seq, event_idx). - encode_
event_ seq - Pack
(tx_seq, event_idx)into a globally ordered event_seq. - event_
seq_ lo - Lowest possible event_seq for a given tx_seq (idx 0).
- packed_
range - Convert semantic event-coordinate bounds into the packed half-open range
scanned by bitmap indexes. Accepts any coordinate type that projects to
(tx_seq, event_idx), so callers can pass their own position type without this crate knowing about it.