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