Skip to main content

Crate wowlab_buffer_contract

Crate wowlab_buffer_contract 

Source
Expand description

Stable metadata and memory-layout contracts for the rotation engine.

Modulesยง

field_offset
Pinned byte offsets for fields read by multi-field EvalKind variants.

Structsยง

FieldDescriptor
Inventory entry describing one expression-readable buffer field.
SlotDescriptor
Inventory entry describing one dense-buffer slot domain.

Enumsยง

EvalKind
Operation used to interpret a field from the dense rotation buffer.
FieldType
Primitive value representation stored in a buffer field.
SlotKind
Whether a slot is a singleton or keyed by spell/aura/resource.

Constantsยง

ACTION_ID_BITS ๐Ÿ”’
ACTION_ID_MASK
24-bit mask for the action ID field.
ACTION_ID_SHIFT
Shift for the 24-bit action ID at bits 32..56.
KIND_BITS ๐Ÿ”’
KIND_SHIFT
Shift for the high 8 kind bits in the packed [kind:8][action_id:24][payload:32] layout.
PACKED_BITS ๐Ÿ”’
PANDEMIC_REFRESH_FRACTION
Pandemic refresh fraction; an aura is refreshable once remaining < fraction * base_duration (WoW 30% window).
PAYLOAD_BITS ๐Ÿ”’
SLOT_ALIGNMENT
Required slot alignment, in bytes; assert_repr_c_layout rejects any field with a stricter alignment.

Functionsยง

assert_repr_c_layout
Asserts that a repr(C) layout matches declared (size, alignment) pairs.
decode_eval_result
Decodes [kind:8][action_id:24][payload:32] into its components.
pack_eval_result
Packs an evaluation result into [kind:8][action_id:24][payload:32].