bitflag_attr

Trait BitsPrimitive

Source
pub trait BitsPrimitive:
    Sealed
    + Copy
    + PartialEq
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + BitXor<Output = Self>
    + Not<Output = Self>
    + BitAndAssign
    + BitOrAssign
    + BitXorAssign
    + Binary
    + LowerHex
    + UpperHex
    + Octal
    + Sized
    + 'static {
    const EMPTY: Self;
    const ALL: Self;
}
Expand description

Primitive types that can be used with bitflag attribute implement this trait.

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

Source§

const EMPTY: Self = 0i8

Source§

const ALL: Self = -1i8

Source§

impl BitsPrimitive for i16

Source§

const EMPTY: Self = 0i16

Source§

const ALL: Self = -1i16

Source§

impl BitsPrimitive for i32

Source§

const EMPTY: Self = 0i32

Source§

const ALL: Self = -1i32

Source§

impl BitsPrimitive for i64

Source§

const EMPTY: Self = 0i64

Source§

const ALL: Self = -1i64

Source§

impl BitsPrimitive for i128

Source§

const EMPTY: Self = 0i128

Source§

const ALL: Self = -1i128

Source§

impl BitsPrimitive for isize

Source§

const EMPTY: Self = 0isize

Source§

const ALL: Self = -1isize

Source§

impl BitsPrimitive for u8

Source§

const EMPTY: Self = 0u8

Source§

const ALL: Self = 255u8

Source§

impl BitsPrimitive for u16

Source§

const EMPTY: Self = 0u16

Source§

const ALL: Self = 65_535u16

Source§

impl BitsPrimitive for u32

Source§

const EMPTY: Self = 0u32

Source§

const ALL: Self = 4_294_967_295u32

Source§

impl BitsPrimitive for u64

Source§

const EMPTY: Self = 0u64

Source§

const ALL: Self = 18_446_744_073_709_551_615u64

Source§

impl BitsPrimitive for u128

Source§

const EMPTY: Self = 0u128

Source§

const ALL: Self = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

impl BitsPrimitive for usize

Source§

const EMPTY: Self = 0usize

Source§

const ALL: Self = 18_446_744_073_709_551_615usize

Implementors§