Trait tinybitset::BitBlock

source ·
pub trait BitBlock: PrimInt + BitAndAssign + BitOrAssign + BitXorAssign + Binary + LowerHex + UpperHex + 'static {
    const BITS: usize;
    const EMPTY: Self;
    const LSB: Self;
    const ALL: Self;
}
Expand description

Integer that can be used as a block of bits in a bitset.

Required Associated Constants§

source

const BITS: usize

Number of bits in the block.

source

const EMPTY: Self

Block without any bits set, aka 0.

source

const LSB: Self

Block with only the least significant bit set, aka 1.

source

const ALL: Self

Block with all bits set.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BitBlock for u8

source§

const BITS: usize = 8usize

source§

const EMPTY: Self = 0u8

source§

const LSB: Self = 1u8

source§

const ALL: Self = 255u8

source§

impl BitBlock for u16

source§

const BITS: usize = 16usize

source§

const EMPTY: Self = 0u16

source§

const LSB: Self = 1u16

source§

const ALL: Self = 65_535u16

source§

impl BitBlock for u32

source§

const BITS: usize = 32usize

source§

const EMPTY: Self = 0u32

source§

const LSB: Self = 1u32

source§

const ALL: Self = 4_294_967_295u32

source§

impl BitBlock for u64

source§

const BITS: usize = 64usize

source§

const EMPTY: Self = 0u64

source§

const LSB: Self = 1u64

source§

const ALL: Self = 18_446_744_073_709_551_615u64

source§

impl BitBlock for u128

source§

const BITS: usize = 128usize

source§

const EMPTY: Self = 0u128

source§

const LSB: Self = 1u128

source§

const ALL: Self = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Implementors§