Trait mysql_common::bitflags_ext::Bitflags
source · 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§
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
sourceunsafe 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.
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)
Object Safety§
This trait is not object safe.