pub struct SignalFlags { /* private fields */ }Implementations§
§impl SignalFlags
impl SignalFlags
pub const RUN_FIRST: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_RUN_FIRST as _,}
pub const RUN_LAST: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_RUN_LAST as _,}
pub const RUN_CLEANUP: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_RUN_CLEANUP as _,}
pub const NO_RECURSE: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_NO_RECURSE as _,}
pub const DETAILED: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_DETAILED as _,}
pub const ACTION: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_ACTION as _,}
pub const NO_HOOKS: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_NO_HOOKS as _,}
pub const MUST_COLLECT: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_MUST_COLLECT as _,}
pub const DEPRECATED: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_DEPRECATED as _,}
pub const ACCUMULATOR_FIRST_RUN: SignalFlags = Self{ bits: gobject_ffi::G_SIGNAL_ACCUMULATOR_FIRST_RUN as _,}
pub const fn empty() -> SignalFlags
pub const fn empty() -> SignalFlags
Returns an empty set of flags.
pub const fn all() -> SignalFlags
pub const fn all() -> SignalFlags
Returns the set containing all flags.
pub const fn from_bits(bits: u32) -> Option<SignalFlags>
pub const fn from_bits(bits: u32) -> Option<SignalFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> SignalFlags
pub const fn from_bits_truncate(bits: u32) -> SignalFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> SignalFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> SignalFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags! macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked() has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
pub const fn intersects(&self, other: SignalFlags) -> bool
pub const fn intersects(&self, other: SignalFlags) -> bool
Returns true if there are flags common to both self and other.
pub const fn contains(&self, other: SignalFlags) -> bool
pub const fn contains(&self, other: SignalFlags) -> bool
Returns true if all of the flags in other are contained within self.
pub fn insert(&mut self, other: SignalFlags)
pub fn insert(&mut self, other: SignalFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: SignalFlags)
pub fn remove(&mut self, other: SignalFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: SignalFlags)
pub fn toggle(&mut self, other: SignalFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: SignalFlags, value: bool)
pub fn set(&mut self, other: SignalFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
pub const fn intersection(self, other: SignalFlags) -> SignalFlags
pub const fn intersection(self, other: SignalFlags) -> SignalFlags
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
pub const fn union(self, other: SignalFlags) -> SignalFlags
pub const fn union(self, other: SignalFlags) -> SignalFlags
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both (see Self::symmetric_difference if that
is undesirable).
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
pub const fn difference(self, other: SignalFlags) -> SignalFlags
pub const fn difference(self, other: SignalFlags) -> SignalFlags
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
pub const fn symmetric_difference(self, other: SignalFlags) -> SignalFlags
pub const fn symmetric_difference(self, other: SignalFlags) -> SignalFlags
Returns the symmetric difference between the flags
in self and other.
Specifically, the returned set contains the flags present which
are present in self or other, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self and other.
This is equivalent to using the ^ operator (e.g.
ops::BitXor), as in flags ^ other.
pub const fn complement(self) -> SignalFlags
pub const fn complement(self) -> SignalFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all() and self (e.g. Self::all() - self)
This is equivalent to using the ! operator (e.g.
ops::Not), as in !flags.
Trait Implementations§
§impl Binary for SignalFlags
impl Binary for SignalFlags
§impl BitAnd<SignalFlags> for SignalFlags
impl BitAnd<SignalFlags> for SignalFlags
§fn bitand(self, other: SignalFlags) -> SignalFlags
fn bitand(self, other: SignalFlags) -> SignalFlags
Returns the intersection between the two sets of flags.
§type Output = SignalFlags
type Output = SignalFlags
& operator.§impl BitAndAssign<SignalFlags> for SignalFlags
impl BitAndAssign<SignalFlags> for SignalFlags
§fn bitand_assign(&mut self, other: SignalFlags)
fn bitand_assign(&mut self, other: SignalFlags)
Disables all flags disabled in the set.
§impl BitOr<SignalFlags> for SignalFlags
impl BitOr<SignalFlags> for SignalFlags
§fn bitor(self, other: SignalFlags) -> SignalFlags
fn bitor(self, other: SignalFlags) -> SignalFlags
Returns the union of the two sets of flags.
§type Output = SignalFlags
type Output = SignalFlags
| operator.§impl BitOrAssign<SignalFlags> for SignalFlags
impl BitOrAssign<SignalFlags> for SignalFlags
§fn bitor_assign(&mut self, other: SignalFlags)
fn bitor_assign(&mut self, other: SignalFlags)
Adds the set of flags.
§impl BitXor<SignalFlags> for SignalFlags
impl BitXor<SignalFlags> for SignalFlags
§fn bitxor(self, other: SignalFlags) -> SignalFlags
fn bitxor(self, other: SignalFlags) -> SignalFlags
Returns the left flags, but with all the right flags toggled.
§type Output = SignalFlags
type Output = SignalFlags
^ operator.§impl BitXorAssign<SignalFlags> for SignalFlags
impl BitXorAssign<SignalFlags> for SignalFlags
§fn bitxor_assign(&mut self, other: SignalFlags)
fn bitxor_assign(&mut self, other: SignalFlags)
Toggles the set of flags.
§impl Clone for SignalFlags
impl Clone for SignalFlags
§fn clone(&self) -> SignalFlags
fn clone(&self) -> SignalFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SignalFlags
impl Debug for SignalFlags
§impl Display for SignalFlags
impl Display for SignalFlags
§impl Extend<SignalFlags> for SignalFlags
impl Extend<SignalFlags> for SignalFlags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = SignalFlags>,
fn extend<T>(&mut self, iterator: T)where T: IntoIterator<Item = SignalFlags>,
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)§impl FromIterator<SignalFlags> for SignalFlags
impl FromIterator<SignalFlags> for SignalFlags
§fn from_iter<T>(iterator: T) -> SignalFlagswhere
T: IntoIterator<Item = SignalFlags>,
fn from_iter<T>(iterator: T) -> SignalFlagswhere T: IntoIterator<Item = SignalFlags>,
§impl Hash for SignalFlags
impl Hash for SignalFlags
§impl LowerHex for SignalFlags
impl LowerHex for SignalFlags
§impl Not for SignalFlags
impl Not for SignalFlags
§fn not(self) -> SignalFlags
fn not(self) -> SignalFlags
Returns the complement of this set of flags.
§type Output = SignalFlags
type Output = SignalFlags
! operator.§impl Octal for SignalFlags
impl Octal for SignalFlags
§impl Ord for SignalFlags
impl Ord for SignalFlags
§impl PartialEq<SignalFlags> for SignalFlags
impl PartialEq<SignalFlags> for SignalFlags
§fn eq(&self, other: &SignalFlags) -> bool
fn eq(&self, other: &SignalFlags) -> bool
self and other values to be equal, and is used
by ==.§impl PartialOrd<SignalFlags> for SignalFlags
impl PartialOrd<SignalFlags> for SignalFlags
§fn partial_cmp(&self, other: &SignalFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &SignalFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more§impl Sub<SignalFlags> for SignalFlags
impl Sub<SignalFlags> for SignalFlags
§fn sub(self, other: SignalFlags) -> SignalFlags
fn sub(self, other: SignalFlags) -> SignalFlags
Returns the set difference of the two sets of flags.
§type Output = SignalFlags
type Output = SignalFlags
- operator.§impl SubAssign<SignalFlags> for SignalFlags
impl SubAssign<SignalFlags> for SignalFlags
§fn sub_assign(&mut self, other: SignalFlags)
fn sub_assign(&mut self, other: SignalFlags)
Disables all flags enabled in the set.