pub struct StateFlags { /* private fields */ }
Implementations§
Source§impl StateFlags
impl StateFlags
pub const NORMAL: StateFlags
pub const ACTIVE: StateFlags
pub const PRELIGHT: StateFlags
pub const SELECTED: StateFlags
pub const INSENSITIVE: StateFlags
pub const INCONSISTENT: StateFlags
pub const FOCUSED: StateFlags
pub const BACKDROP: StateFlags
pub const DIR_LTR: StateFlags
pub const DIR_RTL: StateFlags
pub const LINK: StateFlags
pub const VISITED: StateFlags
pub const CHECKED: StateFlags
pub const DROP_ACTIVE: StateFlags
Sourcepub const fn empty() -> StateFlags
pub const fn empty() -> StateFlags
Returns an empty set of flags
Sourcepub const fn all() -> StateFlags
pub const fn all() -> StateFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<StateFlags>
pub fn from_bits(bits: u32) -> Option<StateFlags>
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) -> StateFlags
pub const fn from_bits_truncate(bits: u32) -> StateFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> StateFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> StateFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: StateFlags) -> bool
pub const fn intersects(&self, other: StateFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: StateFlags) -> bool
pub const fn contains(&self, other: StateFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: StateFlags)
pub fn insert(&mut self, other: StateFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: StateFlags)
pub fn remove(&mut self, other: StateFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: StateFlags)
pub fn toggle(&mut self, other: StateFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: StateFlags, value: bool)
pub fn set(&mut self, other: StateFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for StateFlags
impl Binary for StateFlags
Source§impl BitAnd for StateFlags
impl BitAnd for StateFlags
Source§fn bitand(self, other: StateFlags) -> StateFlags
fn bitand(self, other: StateFlags) -> StateFlags
Returns the intersection between the two sets of flags.
Source§type Output = StateFlags
type Output = StateFlags
&
operator.Source§impl BitAndAssign for StateFlags
impl BitAndAssign for StateFlags
Source§fn bitand_assign(&mut self, other: StateFlags)
fn bitand_assign(&mut self, other: StateFlags)
Disables all flags disabled in the set.
Source§impl BitOr for StateFlags
impl BitOr for StateFlags
Source§fn bitor(self, other: StateFlags) -> StateFlags
fn bitor(self, other: StateFlags) -> StateFlags
Returns the union of the two sets of flags.
Source§type Output = StateFlags
type Output = StateFlags
|
operator.Source§impl BitOrAssign for StateFlags
impl BitOrAssign for StateFlags
Source§fn bitor_assign(&mut self, other: StateFlags)
fn bitor_assign(&mut self, other: StateFlags)
Adds the set of flags.
Source§impl BitXor for StateFlags
impl BitXor for StateFlags
Source§fn bitxor(self, other: StateFlags) -> StateFlags
fn bitxor(self, other: StateFlags) -> StateFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = StateFlags
type Output = StateFlags
^
operator.Source§impl BitXorAssign for StateFlags
impl BitXorAssign for StateFlags
Source§fn bitxor_assign(&mut self, other: StateFlags)
fn bitxor_assign(&mut self, other: StateFlags)
Toggles the set of flags.
Source§impl Clone for StateFlags
impl Clone for StateFlags
Source§fn clone(&self) -> StateFlags
fn clone(&self) -> StateFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StateFlags
impl Debug for StateFlags
Source§impl Extend<StateFlags> for StateFlags
impl Extend<StateFlags> for StateFlags
Source§fn extend<T: IntoIterator<Item = StateFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = StateFlags>>(&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<StateFlags> for StateFlags
impl FromIterator<StateFlags> for StateFlags
Source§fn from_iter<T: IntoIterator<Item = StateFlags>>(iterator: T) -> StateFlags
fn from_iter<T: IntoIterator<Item = StateFlags>>(iterator: T) -> StateFlags
Source§impl<'a> FromValue<'a> for StateFlags
impl<'a> FromValue<'a> for StateFlags
unsafe fn from_value(value: &Value) -> Self
Source§impl<'a> FromValueOptional<'a> for StateFlags
impl<'a> FromValueOptional<'a> for StateFlags
unsafe fn from_value_optional(value: &Value) -> Option<Self>
Source§impl Hash for StateFlags
impl Hash for StateFlags
Source§impl LowerHex for StateFlags
impl LowerHex for StateFlags
Source§impl Not for StateFlags
impl Not for StateFlags
Source§fn not(self) -> StateFlags
fn not(self) -> StateFlags
Returns the complement of this set of flags.
Source§type Output = StateFlags
type Output = StateFlags
!
operator.Source§impl Octal for StateFlags
impl Octal for StateFlags
Source§impl Ord for StateFlags
impl Ord for StateFlags
Source§fn cmp(&self, other: &StateFlags) -> Ordering
fn cmp(&self, other: &StateFlags) -> 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 StateFlags
impl PartialEq for StateFlags
Source§impl PartialOrd for StateFlags
impl PartialOrd for StateFlags
Source§impl StaticType for StateFlags
impl StaticType for StateFlags
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.Source§impl Sub for StateFlags
impl Sub for StateFlags
Source§fn sub(self, other: StateFlags) -> StateFlags
fn sub(self, other: StateFlags) -> StateFlags
Returns the set difference of the two sets of flags.
Source§type Output = StateFlags
type Output = StateFlags
-
operator.Source§impl SubAssign for StateFlags
impl SubAssign for StateFlags
Source§fn sub_assign(&mut self, other: StateFlags)
fn sub_assign(&mut self, other: StateFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for StateFlags
impl UpperHex for StateFlags
impl Copy for StateFlags
impl Eq for StateFlags
impl StructuralPartialEq for StateFlags
Auto Trait Implementations§
impl Freeze for StateFlags
impl RefUnwindSafe for StateFlags
impl Send for StateFlags
impl Sync for StateFlags
impl Unpin for StateFlags
impl UnwindSafe for StateFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.