Struct pcsc::Transaction [] [src]

pub struct Transaction<'card> { /* fields omitted */ }

An exclusive transaction with a card.

Methods

impl<'card> Transaction<'card>
[src]

End the transaction.

In case of error, ownership of the transaction is returned to the caller.

This function wraps SCardEndTransaction (pcsclite, MSDN).

Note

Transaction implements Drop which automatically ends the transaction using Disposition::LeaveCard; you only need to call this function if you want to handle errors or use a different disposition method.

Methods from Deref<Target=Card<'card>>

Disconnect from the card.

In case of error, ownership of the card is returned to the caller.

This function wraps SCardDisconnect (pcsclite, MSDN).

Note

Card implements Drop which automatically disconnects the card using Disposition::ResetCard; you only need to call this function if you want to handle errors or use a different disposition method.

Get current info on the card.

This function wraps SCardStatus (pcsclite, MSDN).

Get an attribute of the card or card reader.

buffer is a buffer that should be large enough for the attribute data.

Returns a slice into buffer containing the attribute data.

If the buffer is not large enough, Error::InsufficientBuffer is returned.

This function wraps SCardGetAttrib (pcsclite, MSDN).

Set an attribute of the card or card reader.

This function wraps SCardSetAttrib (pcsclite, MSDN).

Transmit an APDU command to the card.

receive_buffer is a buffer that should be large enough to hold the APDU response.

Returns a slice into receive_buffer containing the APDU response.

If receive_buffer is not large enough to hold the APDU response, Error::InsufficientBuffer is returned.

This function wraps SCardTransmit (pcsclite, MSDN).

Trait Implementations

impl<'card> Drop for Transaction<'card>
[src]

A method called when the value goes out of scope. Read more

impl<'card> Deref for Transaction<'card>
[src]

The resulting type after dereferencing

The method called to dereference a value