Trait mysql_common::bitflags_ext::Bitflags [−][src]
pub trait Bitflags: Copy {
type Repr: Copy + PrimInt;
Show 14 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.
Associated Types
Required methods
fn from_bits_truncate(bits: Self::Repr) -> Self
unsafe fn from_bits_unchecked(bits: Self::Repr) -> Self
unsafe fn from_bits_unchecked(bits: Self::Repr) -> Self
Safety
Safety requirements are defined by the [bitflags!
] macro.