Bits

Trait Bits 

Source
pub trait Bits:
    Clone
    + Copy
    + PartialEq
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + BitXor<Output = Self>
    + Not<Output = Self>
    + Sized
    + 'static {
    const EMPTY: Self;
    const ALL: Self;
}
Expand description

A bits type that can be used as storage for a flags type.

Required Associated Constants§

Source

const EMPTY: Self

A value with all bits unset.

Source

const ALL: Self

A value with all bits set.

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 Bits for i8

Source§

const EMPTY: i8 = 0

Source§

const ALL: i8

Source§

impl Bits for i16

Source§

const EMPTY: i16 = 0

Source§

const ALL: i16

Source§

impl Bits for i32

Source§

const EMPTY: i32 = 0

Source§

const ALL: i32

Source§

impl Bits for i64

Source§

const EMPTY: i64 = 0

Source§

const ALL: i64

Source§

impl Bits for i128

Source§

impl Bits for isize

Source§

impl Bits for u8

Source§

const EMPTY: u8 = 0

Source§

const ALL: u8 = u8::MAX

Source§

impl Bits for u16

Source§

const EMPTY: u16 = 0

Source§

const ALL: u16 = u16::MAX

Source§

impl Bits for u32

Source§

const EMPTY: u32 = 0

Source§

const ALL: u32 = u32::MAX

Source§

impl Bits for u64

Source§

const EMPTY: u64 = 0

Source§

const ALL: u64 = u64::MAX

Source§

impl Bits for u128

Source§

const EMPTY: u128 = 0

Source§

const ALL: u128 = u128::MAX

Source§

impl Bits for usize

Source§

const EMPTY: usize = 0

Source§

const ALL: usize = usize::MAX

Implementors§