pub struct State { /* private fields */ }
Expand description
A mask of the state a card reader.
Implementations§
source§impl State
impl State
pub const UNAWARE: State = _
pub const IGNORE: State = _
pub const CHANGED: State = _
pub const UNKNOWN: State = _
pub const UNAVAILABLE: State = _
pub const EMPTY: State = _
pub const PRESENT: State = _
pub const ATRMATCH: State = _
pub const EXCLUSIVE: State = _
pub const INUSE: State = _
pub const MUTE: State = _
pub const UNPOWERED: State = _
sourcepub fn from_bits(bits: DWORD) -> Option<State>
pub fn from_bits(bits: DWORD) -> Option<State>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: DWORD) -> State
pub const fn from_bits_truncate(bits: DWORD) -> State
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: DWORD) -> State
pub const unsafe fn from_bits_unchecked(bits: DWORD) -> State
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: State) -> bool
pub const fn intersects(&self, other: State) -> bool
Returns true
if there are flags common to both self
and other
.
Trait Implementations§
source§impl BitAndAssign for State
impl BitAndAssign for State
source§fn bitand_assign(&mut self, other: State)
fn bitand_assign(&mut self, other: State)
Disables all flags disabled in the set.
source§impl BitOrAssign for State
impl BitOrAssign for State
source§fn bitor_assign(&mut self, other: State)
fn bitor_assign(&mut self, other: State)
Adds the set of flags.
source§impl BitXorAssign for State
impl BitXorAssign for State
source§fn bitxor_assign(&mut self, other: State)
fn bitxor_assign(&mut self, other: State)
Toggles the set of flags.
source§impl Extend<State> for State
impl Extend<State> for State
source§fn extend<T: IntoIterator<Item = State>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = State>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl FromIterator<State> for State
impl FromIterator<State> for State
source§impl Ord for State
impl Ord for State
source§impl PartialEq for State
impl PartialEq for State
source§impl PartialOrd for State
impl PartialOrd for State
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign for State
impl SubAssign for State
source§fn sub_assign(&mut self, other: State)
fn sub_assign(&mut self, other: State)
Disables all flags enabled in the set.
impl Copy for State
impl Eq for State
impl StructuralEq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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