Struct glib::FormatSizeFlags
source · [−]pub struct FormatSizeFlags { /* private fields */ }Implementations
sourceimpl 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
sourceimpl Binary for FormatSizeFlags
impl Binary for FormatSizeFlags
sourceimpl BitAnd<FormatSizeFlags> for FormatSizeFlags
impl BitAnd<FormatSizeFlags> for FormatSizeFlags
sourcefn bitand(self, other: FormatSizeFlags) -> FormatSizeFlags
fn bitand(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the intersection between the two sets of flags.
type Output = FormatSizeFlags
type Output = FormatSizeFlags
& operator.sourceimpl BitAndAssign<FormatSizeFlags> for FormatSizeFlags
impl BitAndAssign<FormatSizeFlags> for FormatSizeFlags
sourcefn bitand_assign(&mut self, other: FormatSizeFlags)
fn bitand_assign(&mut self, other: FormatSizeFlags)
Disables all flags disabled in the set.
sourceimpl BitOr<FormatSizeFlags> for FormatSizeFlags
impl BitOr<FormatSizeFlags> for FormatSizeFlags
sourcefn bitor(self, other: FormatSizeFlags) -> FormatSizeFlags
fn bitor(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the union of the two sets of flags.
type Output = FormatSizeFlags
type Output = FormatSizeFlags
| operator.sourceimpl BitOrAssign<FormatSizeFlags> for FormatSizeFlags
impl BitOrAssign<FormatSizeFlags> for FormatSizeFlags
sourcefn bitor_assign(&mut self, other: FormatSizeFlags)
fn bitor_assign(&mut self, other: FormatSizeFlags)
Adds the set of flags.
sourceimpl BitXor<FormatSizeFlags> for FormatSizeFlags
impl BitXor<FormatSizeFlags> for FormatSizeFlags
sourcefn bitxor(self, other: FormatSizeFlags) -> FormatSizeFlags
fn bitxor(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the left flags, but with all the right flags toggled.
type Output = FormatSizeFlags
type Output = FormatSizeFlags
^ operator.sourceimpl BitXorAssign<FormatSizeFlags> for FormatSizeFlags
impl BitXorAssign<FormatSizeFlags> for FormatSizeFlags
sourcefn bitxor_assign(&mut self, other: FormatSizeFlags)
fn bitxor_assign(&mut self, other: FormatSizeFlags)
Toggles the set of flags.
sourceimpl Clone for FormatSizeFlags
impl Clone for FormatSizeFlags
sourcefn clone(&self) -> FormatSizeFlags
fn clone(&self) -> FormatSizeFlags
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for FormatSizeFlags
impl Debug for FormatSizeFlags
sourceimpl Extend<FormatSizeFlags> for FormatSizeFlags
impl Extend<FormatSizeFlags> for FormatSizeFlags
sourcefn extend<T: IntoIterator<Item = FormatSizeFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = FormatSizeFlags>>(&mut self, iterator: T)
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)sourceimpl FromIterator<FormatSizeFlags> for FormatSizeFlags
impl FromIterator<FormatSizeFlags> for FormatSizeFlags
sourcefn from_iter<T: IntoIterator<Item = FormatSizeFlags>>(
iterator: T
) -> FormatSizeFlags
fn from_iter<T: IntoIterator<Item = FormatSizeFlags>>(
iterator: T
) -> FormatSizeFlags
sourceimpl Hash for FormatSizeFlags
impl Hash for FormatSizeFlags
sourceimpl LowerHex for FormatSizeFlags
impl LowerHex for FormatSizeFlags
sourceimpl Not for FormatSizeFlags
impl Not for FormatSizeFlags
sourcefn not(self) -> FormatSizeFlags
fn not(self) -> FormatSizeFlags
Returns the complement of this set of flags.
type Output = FormatSizeFlags
type Output = FormatSizeFlags
! operator.sourceimpl Octal for FormatSizeFlags
impl Octal for FormatSizeFlags
sourceimpl Ord for FormatSizeFlags
impl Ord for FormatSizeFlags
sourcefn cmp(&self, other: &FormatSizeFlags) -> Ordering
fn cmp(&self, other: &FormatSizeFlags) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialEq<FormatSizeFlags> for FormatSizeFlags
impl PartialEq<FormatSizeFlags> for FormatSizeFlags
sourcefn eq(&self, other: &FormatSizeFlags) -> bool
fn eq(&self, other: &FormatSizeFlags) -> bool
sourceimpl PartialOrd<FormatSizeFlags> for FormatSizeFlags
impl PartialOrd<FormatSizeFlags> for FormatSizeFlags
sourcefn partial_cmp(&self, other: &FormatSizeFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &FormatSizeFlags) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresourceimpl Sub<FormatSizeFlags> for FormatSizeFlags
impl Sub<FormatSizeFlags> for FormatSizeFlags
sourcefn sub(self, other: FormatSizeFlags) -> FormatSizeFlags
fn sub(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the set difference of the two sets of flags.
type Output = FormatSizeFlags
type Output = FormatSizeFlags
- operator.sourceimpl SubAssign<FormatSizeFlags> for FormatSizeFlags
impl SubAssign<FormatSizeFlags> for FormatSizeFlags
sourcefn sub_assign(&mut self, other: FormatSizeFlags)
fn sub_assign(&mut self, other: FormatSizeFlags)
Disables all flags enabled in the set.