pub struct Status { /* private fields */ }
Expand description
A mask of the status of a card in a card reader.
Portability note
On Windows, Status always has exactly one bit set, and the bit values do not correspond to underlying PC/SC constants. This allows Status to be used in the same way across all platforms.
Implementations§
source§impl Status
impl Status
pub const UNKNOWN: Status = _
pub const ABSENT: Status = _
pub const PRESENT: Status = _
pub const SWALLOWED: Status = _
pub const POWERED: Status = _
pub const NEGOTIABLE: Status = _
pub const SPECIFIC: Status = _
sourcepub fn from_bits(bits: DWORD) -> Option<Status>
pub fn from_bits(bits: DWORD) -> Option<Status>
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) -> Status
pub const fn from_bits_truncate(bits: DWORD) -> Status
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: DWORD) -> Status
pub const unsafe fn from_bits_unchecked(bits: DWORD) -> Status
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: Status) -> bool
pub const fn intersects(&self, other: Status) -> bool
Returns true
if there are flags common to both self
and other
.
Trait Implementations§
source§impl BitAndAssign for Status
impl BitAndAssign for Status
source§fn bitand_assign(&mut self, other: Status)
fn bitand_assign(&mut self, other: Status)
Disables all flags disabled in the set.
source§impl BitOrAssign for Status
impl BitOrAssign for Status
source§fn bitor_assign(&mut self, other: Status)
fn bitor_assign(&mut self, other: Status)
Adds the set of flags.
source§impl BitXorAssign for Status
impl BitXorAssign for Status
source§fn bitxor_assign(&mut self, other: Status)
fn bitxor_assign(&mut self, other: Status)
Toggles the set of flags.
source§impl Extend<Status> for Status
impl Extend<Status> for Status
source§fn extend<T: IntoIterator<Item = Status>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Status>>(&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<Status> for Status
impl FromIterator<Status> for Status
source§impl Ord for Status
impl Ord for Status
source§impl PartialEq for Status
impl PartialEq for Status
source§impl PartialOrd for Status
impl PartialOrd for Status
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 Status
impl SubAssign for Status
source§fn sub_assign(&mut self, other: Status)
fn sub_assign(&mut self, other: Status)
Disables all flags enabled in the set.
impl Copy for Status
impl Eq for Status
impl StructuralEq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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