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