Skip to main content

BinaryState

Trait BinaryState 

Source
pub trait BinaryState:
    Copy
    + Eq
    + Hash {
    // Required method
    fn bit(&self, index: usize) -> Result<bool>;
}
Expand description

Integer-like binary occupation state used by sector-native subsystem contractions.

The trait deliberately exposes only one bit query. Subsystem algorithms therefore work with packed u128, fixed-width wide states, and the runtime-erased state without depending on their storage representation.

Required Methods§

Source

fn bit(&self, index: usize) -> Result<bool>

Return whether the binary mode at index is occupied.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BinaryState for u128

Source§

fn bit(&self, index: usize) -> Result<bool>

Implementors§

Source§

impl BinaryState for ErasedState

Source§

impl<const WORDS: usize> BinaryState for WideState<WORDS>