Skip to main content

wowlab_engine_domain/rotation/buffer/
abi_pins.rs

1//! Compile-time ABI pins binding the shared `field_offset` constants to the real slot layouts.
2
3use wowlab_buffer_contract::field_offset;
4
5use super::{AuraSlot, CooldownSlot, ResourceSlot, UnitSlot};
6
7const _: () = assert!(
8    field_offset::cooldown::READY_AT == CooldownSlot::OFF_READY_AT,
9    "field_offset::cooldown::READY_AT must match CooldownSlot::OFF_READY_AT"
10);
11const _: () = assert!(
12    field_offset::cooldown::CURRENT_CHARGES == CooldownSlot::OFF_CURRENT_CHARGES,
13    "field_offset::cooldown::CURRENT_CHARGES must match CooldownSlot::OFF_CURRENT_CHARGES"
14);
15const _: () = assert!(
16    field_offset::cooldown::MAX_CHARGES == CooldownSlot::OFF_MAX_CHARGES,
17    "field_offset::cooldown::MAX_CHARGES must match CooldownSlot::OFF_MAX_CHARGES"
18);
19const _: () = assert!(
20    field_offset::cooldown::NEXT_CHARGE_AT == CooldownSlot::OFF_NEXT_CHARGE_AT,
21    "field_offset::cooldown::NEXT_CHARGE_AT must match CooldownSlot::OFF_NEXT_CHARGE_AT"
22);
23const _: () = assert!(
24    field_offset::cooldown::RECHARGE_TIME == CooldownSlot::OFF_RECHARGE_TIME,
25    "field_offset::cooldown::RECHARGE_TIME must match CooldownSlot::OFF_RECHARGE_TIME"
26);
27const _: () = assert!(
28    field_offset::aura::EXPIRES_AT == AuraSlot::OFF_EXPIRES_AT,
29    "field_offset::aura::EXPIRES_AT must match AuraSlot::OFF_EXPIRES_AT"
30);
31const _: () = assert!(
32    field_offset::aura::BASE_DURATION == AuraSlot::OFF_BASE_DURATION,
33    "field_offset::aura::BASE_DURATION must match AuraSlot::OFF_BASE_DURATION"
34);
35const _: () = assert!(
36    field_offset::resource::CURRENT == ResourceSlot::OFF_CURRENT,
37    "field_offset::resource::CURRENT must match ResourceSlot::OFF_CURRENT"
38);
39const _: () = assert!(
40    field_offset::resource::MAX == ResourceSlot::OFF_MAX,
41    "field_offset::resource::MAX must match ResourceSlot::OFF_MAX"
42);
43const _: () = assert!(
44    field_offset::resource::REGEN_PER_SEC == ResourceSlot::OFF_REGEN_PER_SEC,
45    "field_offset::resource::REGEN_PER_SEC must match ResourceSlot::OFF_REGEN_PER_SEC"
46);
47const _: () = assert!(
48    field_offset::unit::HEALTH == UnitSlot::OFF_HEALTH,
49    "field_offset::unit::HEALTH must match UnitSlot::OFF_HEALTH"
50);
51const _: () = assert!(
52    field_offset::unit::MAX_HEALTH == UnitSlot::OFF_MAX_HEALTH,
53    "field_offset::unit::MAX_HEALTH must match UnitSlot::OFF_MAX_HEALTH"
54);