Trait bitflags::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.

Object Safety§

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§