Struct smartcard::logic::card::Card
[−]
[src]
pub struct Card { /* fields omitted */ }
This struct represents a smartcard.
Methods
impl Card
[src]
fn connect_to(
context: Arc<Context>,
reader: &Reader,
share_mode: ShareMode,
preferred_protocol: Protocol
) -> Result<Card>
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.
fn get_pci(&self) -> Result<&SCARD_IO_REQUEST>
Get a pointer to the static PCI from the specified protocol
fn reconnect(&mut self, init_type: InitializationType) -> Result<()>
fn send_raw_command(
&self,
cmd: &[u8],
max_answer_size: usize
) -> Result<Vec<u8>>
&self,
cmd: &[u8],
max_answer_size: usize
) -> Result<Vec<u8>>
Send a raw command to the smartcard.
Arguments
cmd
- The cmd you want to send.max_answer_size
- The maximum size of the expected answer.
Trait Implementations
impl Drop for Card
[src]
fn drop(&mut self)
Disconnect the card at the end