Skip to main content

BitStorage

Trait BitStorage 

Source
pub trait BitStorage:
    Copy
    + Default
    + Debug
    + BitAnd<Output = Self>
    + BitAndAssign
    + BitOr<Output = Self>
    + BitOrAssign
    + BitXor<Output = Self>
    + BitXorAssign
    + Not<Output = Self>
    + From<u8>
    + Shl<usize, Output = Self>
    + Shr<usize, Output = Self>
    + PartialEq
    + Eq {
    const BITS: usize;

    // Required methods
    fn trailing_zeros(self) -> u32;
    fn count_ones(self) -> u32;
    fn count_zeros(self) -> u32;
}

Required Associated Constants§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BitStorage for u8

Source§

impl BitStorage for u16

Source§

impl BitStorage for u32

Source§

impl BitStorage for u64

Source§

impl BitStorage for u128

Implementors§