pub struct ParamFlags { /* private fields */ }
Implementations§
Source§impl ParamFlags
impl ParamFlags
pub const READABLE: ParamFlags
pub const WRITABLE: ParamFlags
pub const READWRITE: ParamFlags
pub const CONSTRUCT: ParamFlags
pub const CONSTRUCT_ONLY: ParamFlags
pub const LAX_VALIDATION: ParamFlags
pub const STATIC_NAME: ParamFlags
pub const PRIVATE: ParamFlags
pub const STATIC_NICK: ParamFlags
pub const STATIC_BLURB: ParamFlags
pub const EXPLICIT_NOTIFY: ParamFlags
pub const DEPRECATED: ParamFlags
Sourcepub const fn empty() -> ParamFlags
pub const fn empty() -> ParamFlags
Returns an empty set of flags
Sourcepub const fn all() -> ParamFlags
pub const fn all() -> ParamFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<ParamFlags>
pub fn from_bits(bits: u32) -> Option<ParamFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> ParamFlags
pub const fn from_bits_truncate(bits: u32) -> ParamFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> ParamFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> ParamFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: ParamFlags) -> bool
pub const fn intersects(&self, other: ParamFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: ParamFlags) -> bool
pub const fn contains(&self, other: ParamFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: ParamFlags)
pub fn insert(&mut self, other: ParamFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: ParamFlags)
pub fn remove(&mut self, other: ParamFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: ParamFlags)
pub fn toggle(&mut self, other: ParamFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: ParamFlags, value: bool)
pub fn set(&mut self, other: ParamFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for ParamFlags
impl Binary for ParamFlags
Source§impl BitAnd for ParamFlags
impl BitAnd for ParamFlags
Source§fn bitand(self, other: ParamFlags) -> ParamFlags
fn bitand(self, other: ParamFlags) -> ParamFlags
Returns the intersection between the two sets of flags.
Source§type Output = ParamFlags
type Output = ParamFlags
&
operator.Source§impl BitAndAssign for ParamFlags
impl BitAndAssign for ParamFlags
Source§fn bitand_assign(&mut self, other: ParamFlags)
fn bitand_assign(&mut self, other: ParamFlags)
Disables all flags disabled in the set.
Source§impl BitOr for ParamFlags
impl BitOr for ParamFlags
Source§fn bitor(self, other: ParamFlags) -> ParamFlags
fn bitor(self, other: ParamFlags) -> ParamFlags
Returns the union of the two sets of flags.
Source§type Output = ParamFlags
type Output = ParamFlags
|
operator.Source§impl BitOrAssign for ParamFlags
impl BitOrAssign for ParamFlags
Source§fn bitor_assign(&mut self, other: ParamFlags)
fn bitor_assign(&mut self, other: ParamFlags)
Adds the set of flags.
Source§impl BitXor for ParamFlags
impl BitXor for ParamFlags
Source§fn bitxor(self, other: ParamFlags) -> ParamFlags
fn bitxor(self, other: ParamFlags) -> ParamFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = ParamFlags
type Output = ParamFlags
^
operator.Source§impl BitXorAssign for ParamFlags
impl BitXorAssign for ParamFlags
Source§fn bitxor_assign(&mut self, other: ParamFlags)
fn bitxor_assign(&mut self, other: ParamFlags)
Toggles the set of flags.
Source§impl Clone for ParamFlags
impl Clone for ParamFlags
Source§fn clone(&self) -> ParamFlags
fn clone(&self) -> ParamFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ParamFlags
impl Debug for ParamFlags
Source§impl Extend<ParamFlags> for ParamFlags
impl Extend<ParamFlags> for ParamFlags
Source§fn extend<T: IntoIterator<Item = ParamFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ParamFlags>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<ParamFlags> for ParamFlags
impl FromIterator<ParamFlags> for ParamFlags
Source§fn from_iter<T: IntoIterator<Item = ParamFlags>>(iterator: T) -> ParamFlags
fn from_iter<T: IntoIterator<Item = ParamFlags>>(iterator: T) -> ParamFlags
Source§impl Hash for ParamFlags
impl Hash for ParamFlags
Source§impl LowerHex for ParamFlags
impl LowerHex for ParamFlags
Source§impl Not for ParamFlags
impl Not for ParamFlags
Source§fn not(self) -> ParamFlags
fn not(self) -> ParamFlags
Returns the complement of this set of flags.
Source§type Output = ParamFlags
type Output = ParamFlags
!
operator.Source§impl Octal for ParamFlags
impl Octal for ParamFlags
Source§impl Ord for ParamFlags
impl Ord for ParamFlags
Source§fn cmp(&self, other: &ParamFlags) -> Ordering
fn cmp(&self, other: &ParamFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ParamFlags
impl PartialEq for ParamFlags
Source§impl PartialOrd for ParamFlags
impl PartialOrd for ParamFlags
Source§impl Sub for ParamFlags
impl Sub for ParamFlags
Source§fn sub(self, other: ParamFlags) -> ParamFlags
fn sub(self, other: ParamFlags) -> ParamFlags
Returns the set difference of the two sets of flags.
Source§type Output = ParamFlags
type Output = ParamFlags
-
operator.Source§impl SubAssign for ParamFlags
impl SubAssign for ParamFlags
Source§fn sub_assign(&mut self, other: ParamFlags)
fn sub_assign(&mut self, other: ParamFlags)
Disables all flags enabled in the set.