Skip to main content

BitStorage

Trait BitStorage 

Source
pub trait BitStorage<Rhs = Self, Output = Self>:
    Copy
    + Default
    + PartialEq
    + Eq
    + Display
    + Debug
    + Hash
    + Add<Rhs, Output = Output>
    + Sub<Rhs, Output = Output>
    + Mul<Rhs, Output = Output>
    + Div<Rhs, Output = Output>
    + Rem<Rhs, Output = Output>
    + Binary
    + Shl<usize, Output = Output>
    + Shr<usize, Output = Output>
    + BitAnd
    + BitAnd<Output = Self>
    + BitAndAssign
    + BitOr
    + BitOrAssign
    + BitXor
    + BitXorAssign
    + Not<Output = Self>
    + Sized
    + Send
    + Sync {
    const BITS: usize;
    const ONE: Self;
}
Expand description

Trait for integer types which can be used at bit storage

Required Associated Constants§

Source

const BITS: usize

Number of bits used for this type

Source

const ONE: Self

One as this type as a convenience

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 BitStorage for u8

Source§

const BITS: usize

Source§

const ONE: Self

Source§

impl BitStorage for u16

Source§

const BITS: usize

Source§

const ONE: Self

Source§

impl BitStorage for u32

Source§

const BITS: usize

Source§

const ONE: Self

Source§

impl BitStorage for u64

Source§

const BITS: usize

Source§

const ONE: Self

Source§

impl BitStorage for u128

Source§

const BITS: usize

Source§

const ONE: Self

Source§

impl BitStorage for usize

Source§

const BITS: usize

Source§

const ONE: Self

Implementors§