pub fn connect() -> Result<DeviceWrapper, CommandError>
Expand description
Connects to a Nitrokey device. This method can be used to connect to any connected device, both a Nitrokey Pro and a Nitrokey Storage.
Example
use nitrokey::DeviceWrapper;
fn do_something(device: DeviceWrapper) {}
match nitrokey::connect() {
Ok(device) => do_something(device),
Err(err) => println!("Could not connect to a Nitrokey: {}", err),
}