Struct yubihsm::UsbAdapter [−][src]
pub struct UsbAdapter { pub bus_number: u8, pub device_address: u8, pub serial_number: SerialNumber, pub timeout: UsbTimeout, // some fields omitted }
libusb
-based adapter which communicates directly with the YubiHSM2
Fields
bus_number: u8
USB bus number for this device
device_address: u8
USB device address for this device
serial_number: SerialNumber
Serial number of the device
timeout: UsbTimeout
Timeout for reading from / writing to the YubiHSM2
Trait Implementations
impl Adapter for UsbAdapter
[src]
impl Adapter for UsbAdapter
type Config = UsbConfig
Configuration options for this adapter
fn open(config: &UsbConfig) -> Result<Self, AdapterError>
[src]
fn open(config: &UsbConfig) -> Result<Self, AdapterError>
Connect to a YubiHSM2 using the given configuration
fn healthcheck(&self) -> Result<(), AdapterError>
[src]
fn healthcheck(&self) -> Result<(), AdapterError>
Check that we still have an active USB connection
fn send_message(
&self,
_uuid: Uuid,
cmd: Vec<u8>
) -> Result<Vec<u8>, AdapterError>
[src]
fn send_message(
&self,
_uuid: Uuid,
cmd: Vec<u8>
) -> Result<Vec<u8>, AdapterError>
Send a command to the YubiHSM and read its response
impl Debug for UsbAdapter
[src]
impl Debug for UsbAdapter
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for UsbAdapter
[src]
impl Default for UsbAdapter
Auto Trait Implementations
impl Send for UsbAdapter
impl Send for UsbAdapter
impl Sync for UsbAdapter
impl Sync for UsbAdapter