Skip to main content

Module event_seq

Module event_seq 

Source
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_seq reserved 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.