Struct glib::FormatSizeFlags [−]
pub struct FormatSizeFlags { /* fields omitted */ }
Methods
impl FormatSizeFlags
impl FormatSizeFlags
pub const DEFAULT: FormatSizeFlags
DEFAULT: FormatSizeFlags = FormatSizeFlags{bits: 0,}
pub const LONG_FORMAT: FormatSizeFlags
LONG_FORMAT: FormatSizeFlags = FormatSizeFlags{bits: 1,}
pub const IEC_UNITS: FormatSizeFlags
IEC_UNITS: FormatSizeFlags = FormatSizeFlags{bits: 2,}
pub const BITS: FormatSizeFlags
BITS: FormatSizeFlags = FormatSizeFlags{bits: 4,}
pub fn empty() -> FormatSizeFlags
pub fn empty() -> FormatSizeFlags
Returns an empty set of flags.
pub fn all() -> FormatSizeFlags
pub fn all() -> FormatSizeFlags
Returns the set containing all flags.
pub fn bits(&self) -> u32
pub fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
pub 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.
pub fn from_bits_truncate(bits: u32) -> FormatSizeFlags
pub fn from_bits_truncate(bits: u32) -> FormatSizeFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: FormatSizeFlags) -> bool
pub fn intersects(&self, other: FormatSizeFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: FormatSizeFlags) -> bool
pub fn contains(&self, other: FormatSizeFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: FormatSizeFlags)
pub fn insert(&mut self, other: FormatSizeFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: FormatSizeFlags)
pub fn remove(&mut self, other: FormatSizeFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: FormatSizeFlags)
pub fn toggle(&mut self, other: FormatSizeFlags)
Toggles the specified flags in-place.
pub 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
impl Copy for FormatSizeFlags
impl Copy for FormatSizeFlags
impl PartialEq for FormatSizeFlags
impl PartialEq for FormatSizeFlags
fn eq(&self, other: &FormatSizeFlags) -> bool
fn eq(&self, other: &FormatSizeFlags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &FormatSizeFlags) -> bool
fn ne(&self, other: &FormatSizeFlags) -> bool
This method tests for !=
.
impl Eq for FormatSizeFlags
impl Eq for FormatSizeFlags
impl Clone for FormatSizeFlags
impl Clone for FormatSizeFlags
fn clone(&self) -> FormatSizeFlags
fn clone(&self) -> FormatSizeFlags
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for FormatSizeFlags
impl PartialOrd for FormatSizeFlags
fn partial_cmp(&self, other: &FormatSizeFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &FormatSizeFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &FormatSizeFlags) -> bool
fn lt(&self, other: &FormatSizeFlags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &FormatSizeFlags) -> bool
fn le(&self, other: &FormatSizeFlags) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &FormatSizeFlags) -> bool
fn gt(&self, other: &FormatSizeFlags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &FormatSizeFlags) -> bool
fn ge(&self, other: &FormatSizeFlags) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for FormatSizeFlags
impl Ord for FormatSizeFlags
fn cmp(&self, other: &FormatSizeFlags) -> Ordering
fn cmp(&self, other: &FormatSizeFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for FormatSizeFlags
impl Hash for FormatSizeFlags
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for FormatSizeFlags
impl Debug for FormatSizeFlags
impl Binary for FormatSizeFlags
impl Binary for FormatSizeFlags
impl Octal for FormatSizeFlags
impl Octal for FormatSizeFlags
impl LowerHex for FormatSizeFlags
impl LowerHex for FormatSizeFlags
impl UpperHex for FormatSizeFlags
impl UpperHex for FormatSizeFlags
impl BitOr for FormatSizeFlags
impl BitOr for FormatSizeFlags
type Output = FormatSizeFlags
The resulting type after applying the |
operator.
fn bitor(self, other: FormatSizeFlags) -> FormatSizeFlags
fn bitor(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the union of the two sets of flags.
impl BitOrAssign for FormatSizeFlags
impl BitOrAssign for FormatSizeFlags
fn bitor_assign(&mut self, other: FormatSizeFlags)
fn bitor_assign(&mut self, other: FormatSizeFlags)
Adds the set of flags.
impl BitXor for FormatSizeFlags
impl BitXor for FormatSizeFlags
type Output = FormatSizeFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: FormatSizeFlags) -> FormatSizeFlags
fn bitxor(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for FormatSizeFlags
impl BitXorAssign for FormatSizeFlags
fn bitxor_assign(&mut self, other: FormatSizeFlags)
fn bitxor_assign(&mut self, other: FormatSizeFlags)
Toggles the set of flags.
impl BitAnd for FormatSizeFlags
impl BitAnd for FormatSizeFlags
type Output = FormatSizeFlags
The resulting type after applying the &
operator.
fn bitand(self, other: FormatSizeFlags) -> FormatSizeFlags
fn bitand(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for FormatSizeFlags
impl BitAndAssign for FormatSizeFlags
fn bitand_assign(&mut self, other: FormatSizeFlags)
fn bitand_assign(&mut self, other: FormatSizeFlags)
Disables all flags disabled in the set.
impl Sub for FormatSizeFlags
impl Sub for FormatSizeFlags
type Output = FormatSizeFlags
The resulting type after applying the -
operator.
fn sub(self, other: FormatSizeFlags) -> FormatSizeFlags
fn sub(self, other: FormatSizeFlags) -> FormatSizeFlags
Returns the set difference of the two sets of flags.
impl SubAssign for FormatSizeFlags
impl SubAssign for FormatSizeFlags
fn sub_assign(&mut self, other: FormatSizeFlags)
fn sub_assign(&mut self, other: FormatSizeFlags)
Disables all flags enabled in the set.
impl Not for FormatSizeFlags
impl Not for FormatSizeFlags
type Output = FormatSizeFlags
The resulting type after applying the !
operator.
fn not(self) -> FormatSizeFlags
fn not(self) -> FormatSizeFlags
Returns the complement of this set of flags.
impl Extend<FormatSizeFlags> for FormatSizeFlags
impl Extend<FormatSizeFlags> for FormatSizeFlags
fn extend<T: IntoIterator<Item = FormatSizeFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = FormatSizeFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<FormatSizeFlags> for FormatSizeFlags
impl FromIterator<FormatSizeFlags> for FormatSizeFlags
fn from_iter<T: IntoIterator<Item = FormatSizeFlags>>(
iterator: T
) -> FormatSizeFlags
fn from_iter<T: IntoIterator<Item = FormatSizeFlags>>(
iterator: T
) -> FormatSizeFlags
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for FormatSizeFlags
impl Send for FormatSizeFlags
impl Sync for FormatSizeFlags
impl Sync for FormatSizeFlags