pub trait Bitflags: Copy {
    type Repr: Copy + PrimInt;

Show 14 methods // Required methods fn empty() -> Self; fn all() -> Self; fn bits(&self) -> Self::Repr; fn from_bits(bits: Self::Repr) -> Option<Self>; fn from_bits_truncate(bits: Self::Repr) -> Self; unsafe fn from_bits_unchecked(bits: Self::Repr) -> Self; fn is_empty(&self) -> bool; fn is_all(&self) -> bool; fn intersects(&self, other: Self) -> bool; fn contains(&self, other: Self) -> bool; fn insert(&mut self, other: Self); fn remove(&mut self, other: Self); fn toggle(&mut self, other: Self); fn set(&mut self, other: Self, value: bool);
}
Expand description

Trait for types generated using bitflags::bitflags! macro.

Required Associated Types§

Required Methods§

source

fn empty() -> Self

source

fn all() -> Self

source

fn bits(&self) -> Self::Repr

source

fn from_bits(bits: Self::Repr) -> Option<Self>

source

fn from_bits_truncate(bits: Self::Repr) -> Self

source

unsafe fn from_bits_unchecked(bits: Self::Repr) -> Self

Safety

Safety requirements are defined by the [bitflags!] macro.

source

fn is_empty(&self) -> bool

source

fn is_all(&self) -> bool

source

fn intersects(&self, other: Self) -> bool

source

fn contains(&self, other: Self) -> bool

source

fn insert(&mut self, other: Self)

source

fn remove(&mut self, other: Self)

source

fn toggle(&mut self, other: Self)

source

fn set(&mut self, other: Self, value: bool)

Object Safety§

This trait is not object safe.

Implementors§