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