pub struct Card { /* private fields */ }Expand description
This struct represents a smartcard.
Implementations§
Source§impl Card
impl Card
Sourcepub fn connect_to(
context: Arc<Context>,
reader: &Reader,
share_mode: ShareMode,
preferred_protocol: Protocol,
) -> Result<Card>
pub fn connect_to( context: Arc<Context>, reader: &Reader, share_mode: ShareMode, preferred_protocol: Protocol, ) -> Result<Card>
Connect to a smartcard on the specified reader
§Arguments
context- The resource manager context.reader- The reader that contains the smartcard you want to connect to.share_mode- How do you want to share the access to the smartcard.preferred_protocol- What protocol do you want to use to connect to the smartcard.
Sourcepub fn get_pci(&self) -> Result<&SCARD_IO_REQUEST>
pub fn get_pci(&self) -> Result<&SCARD_IO_REQUEST>
Get a pointer to the static PCI from the specified protocol
Sourcepub fn reconnect(&mut self, init_type: InitializationType) -> Result<()>
pub fn reconnect(&mut self, init_type: InitializationType) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Card
impl RefUnwindSafe for Card
impl Send for Card
impl Sync for Card
impl Unpin for Card
impl UnsafeUnpin for Card
impl UnwindSafe for Card
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