pub trait FiniteBitSetTy: BitAnd<Output = Self> + BitAndAssign + BitOrAssign + Clone + Copy + Shl + Not<Output = Self> + PartialEq + Sized {
    const DOMAIN_SIZE: u32;
    const FILLED: Self;
    const EMPTY: Self;
    const ONE: Self;
    const ZERO: Self;

    // Required methods
    fn checked_shl(self, rhs: u32) -> Option<Self>;
    fn checked_shr(self, rhs: u32) -> Option<Self>;
}
Expand description

Integral type used to represent the bit set.

Required Associated Constants§

source

const DOMAIN_SIZE: u32

Size of the domain representable by this type, e.g. 64 for u64.

source

const FILLED: Self

Value which represents the FiniteBitSet having every bit set.

source

const EMPTY: Self

Value which represents the FiniteBitSet having no bits set.

source

const ONE: Self

Value for one as the integral type.

source

const ZERO: Self

Value for zero as the integral type.

Required Methods§

source

fn checked_shl(self, rhs: u32) -> Option<Self>

Perform a checked left shift on the integral type.

source

fn checked_shr(self, rhs: u32) -> Option<Self>

Perform a checked right shift on the integral type.

Implementations on Foreign Types§

source§

impl FiniteBitSetTy for u32

source§

const DOMAIN_SIZE: u32 = 32u32

source§

const FILLED: Self = 4_294_967_295u32

source§

const EMPTY: Self = 0u32

source§

const ONE: Self = 1u32

source§

const ZERO: Self = 0u32

source§

fn checked_shl(self, rhs: u32) -> Option<Self>

source§

fn checked_shr(self, rhs: u32) -> Option<Self>

source§

impl FiniteBitSetTy for u128

source§

const DOMAIN_SIZE: u32 = 128u32

source§

const FILLED: Self = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

source§

const EMPTY: Self = 0u128

source§

const ONE: Self = 1u128

source§

const ZERO: Self = 0u128

source§

fn checked_shl(self, rhs: u32) -> Option<Self>

source§

fn checked_shr(self, rhs: u32) -> Option<Self>

source§

impl FiniteBitSetTy for u64

source§

const DOMAIN_SIZE: u32 = 64u32

source§

const FILLED: Self = 18_446_744_073_709_551_615u64

source§

const EMPTY: Self = 0u64

source§

const ONE: Self = 1u64

source§

const ZERO: Self = 0u64

source§

fn checked_shl(self, rhs: u32) -> Option<Self>

source§

fn checked_shr(self, rhs: u32) -> Option<Self>

Implementors§