rustc_index::bit_set

Trait FiniteBitSetTy

Source
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.

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 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>

Implementors§