bitflags

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 = 0i8

Source§

const ALL: i8 = -1i8

Source§

impl Bits for i16

Source§

const EMPTY: i16 = 0i16

Source§

const ALL: i16 = -1i16

Source§

impl Bits for i32

Source§

const EMPTY: i32 = 0i32

Source§

const ALL: i32 = -1i32

Source§

impl Bits for i64

Source§

const EMPTY: i64 = 0i64

Source§

const ALL: i64 = -1i64

Source§

impl Bits for i128

Source§

const EMPTY: i128 = 0i128

Source§

const ALL: i128 = -1i128

Source§

impl Bits for isize

Source§

const EMPTY: isize = 0isize

Source§

const ALL: isize = -1isize

Source§

impl Bits for u8

Source§

const EMPTY: u8 = 0u8

Source§

const ALL: u8 = 255u8

Source§

impl Bits for u16

Source§

const EMPTY: u16 = 0u16

Source§

const ALL: u16 = 65_535u16

Source§

impl Bits for u32

Source§

const EMPTY: u32 = 0u32

Source§

const ALL: u32 = 4_294_967_295u32

Source§

impl Bits for u64

Source§

const EMPTY: u64 = 0u64

Source§

const ALL: u64 = 18_446_744_073_709_551_615u64

Source§

impl Bits for u128

Source§

const EMPTY: u128 = 0u128

Source§

const ALL: u128 = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

impl Bits for usize

Source§

const EMPTY: usize = 0usize

Source§

const ALL: usize = 18_446_744_073_709_551_615usize

Implementors§