Struct atspi_common::state::StateSet
source · pub struct StateSet(/* private fields */);
Expand description
The bitflag representation of all states an object may have.
Implementations§
source§impl StateSet
impl StateSet
sourcepub fn new<B: Into<BitFlags<State>>>(value: B) -> Self
pub fn new<B: Into<BitFlags<State>>>(value: B) -> Self
Create a new StateSet
.
§Example
let states = State::Focusable | State::Sensitive | State::Active;
let set = StateSet::new(states);
assert!(set.contains(State::Active));
assert!(!set.contains(State::Busy));
sourcepub fn contains<B: Into<BitFlags<State>>>(self, other: B) -> bool
pub fn contains<B: Into<BitFlags<State>>>(self, other: B) -> bool
Whether the StateSet
contains a State
.
sourcepub fn remove<B: Into<BitFlags<State>>>(&mut self, other: B)
pub fn remove<B: Into<BitFlags<State>>>(&mut self, other: B)
Removes a State
(optionally) previously contained in the StateSet
.
Trait Implementations§
source§impl BitAndAssign for StateSet
impl BitAndAssign for StateSet
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&=
operation. Read moresource§impl BitOrAssign for StateSet
impl BitOrAssign for StateSet
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|=
operation. Read moresource§impl BitXorAssign for StateSet
impl BitXorAssign for StateSet
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^=
operation. Read moresource§impl<'de> Deserialize<'de> for StateSet
impl<'de> Deserialize<'de> for StateSet
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> FromIterator<&'a State> for StateSet
impl<'a> FromIterator<&'a State> for StateSet
source§impl FromIterator<State> for StateSet
impl FromIterator<State> for StateSet
source§impl IntoIterator for &StateSet
impl IntoIterator for &StateSet
source§impl IntoIterator for StateSet
impl IntoIterator for StateSet
impl Copy for StateSet
impl Eq for StateSet
impl StructuralPartialEq for StateSet
Auto Trait Implementations§
impl Freeze for StateSet
impl RefUnwindSafe for StateSet
impl Send for StateSet
impl Sync for StateSet
impl Unpin for StateSet
impl UnwindSafe for StateSet
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<'de, T> DynamicDeserialize<'de> for T
impl<'de, T> DynamicDeserialize<'de> for T
§type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
source§fn deserializer_for_signature<S>(
signature: S,
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
fn deserializer_for_signature<S>( signature: S, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
Get a deserializer compatible with this signature.
source§impl<T> DynamicType for T
impl<T> DynamicType for T
source§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.