/// Bit position of the 2-bit state code inside `state_word`.
pub const STATE_SHIFT: u32 = 62;
/// Encoded state tag for `CircuitState::Closed`.
pub const STATE_CLOSED: u64 = 0;
/// Encoded state tag for `CircuitState::Open`.
pub const STATE_OPEN: u64 = 1;
/// Encoded state tag for `CircuitState::HalfOpen`.
pub const STATE_HALF_OPEN: u64 = 2;
/// Bit position of the 30-bit monotonic generation counter inside `state_word`.
pub const GEN_SHIFT: u32 = 32;
/// Bitmask extracting the 30-bit generation counter.
pub const GEN_MASK: u64 = - 1;
/// Bit position of the upper 16-bit auxiliary counter (`consecutive_failures` or `dispatched_probes`).
pub const HI_AUX_SHIFT: u32 = 16;
/// Bitmask extracting a 16-bit auxiliary counter.
pub const AUX_MASK: u64 = 0xFFFF;
/// Number of generation-indexed open-timestamp slots preventing cross-cycle timestamp races.
pub const OPENED_AT_SLOTS: usize = 8;
/// Bitmask indexing into `opened_at_slots`.
pub const OPENED_AT_SLOT_MASK: usize = OPENED_AT_SLOTS - 1;