pub trait Card {
// Required methods
fn info(&mut self) -> Result<CardInfo, CardError>;
fn verify(&mut self, pin: &Password, mode: PinMode) -> Result<(), CardError>;
fn sign(&mut self, input: ToSign<'_>) -> Result<Vec<u8>, CardError>;
fn decipher(
&mut self,
input: ToDecipher<'_>,
) -> Result<Protected, CardError>;
}Expand description
A security key, open for one operation: what it says, its PIN, and its two
private operations. The opening and the closing are the Readers’.
Required Methods§
Sourcefn verify(&mut self, pin: &Password, mode: PinMode) -> Result<(), CardError>
fn verify(&mut self, pin: &Password, mode: PinMode) -> Result<(), CardError>
Gives it its PIN; a wrong one costs a try.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".