Skip to main content

BitsPrimitive

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".

Implementations on Foreign Types§

Source§

impl BitsPrimitive for i8

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for i16

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for i32

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for i64

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for i128

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for isize

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for u8

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for u16

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for u32

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for u64

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for u128

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Source§

impl BitsPrimitive for usize

Source§

const EMPTY: Self = 0

Source§

const ALL: Self

Implementors§