Struct yubihsm::connector::usb::UsbConnector [−][src]
pub struct UsbConnector(_);
Connect to the HSM via USB.
UsbConnector
is available when the usb
cargo feature is enabled.
It requires libusb
as a dependency, but does not otherwise need the
Yubico SDK (which is a vicarious dependency of UsbConnector
which
needs the yubihsm-connector
process).
Methods
impl UsbConnector
[src]
impl UsbConnector
pub fn new(config: &UsbConfig) -> Result<Self, ConnectionError>
[src]
pub fn new(config: &UsbConfig) -> Result<Self, ConnectionError>
Create a new UsbConnector
with the given configuration
Trait Implementations
impl Default for UsbConnector
[src]
impl Default for UsbConnector
fn default() -> UsbConnector
[src]
fn default() -> UsbConnector
Returns the "default value" for a type. Read more
impl Connector for UsbConnector
[src]
impl Connector for UsbConnector
fn connect(&self) -> Result<Box<Connection>, ConnectionError>
[src]
fn connect(&self) -> Result<Box<Connection>, ConnectionError>
Open a connection to yubihsm-connector
fn healthcheck(&self) -> Result<(), ConnectionError>
[src]
fn healthcheck(&self) -> Result<(), ConnectionError>
Check that the connection to the HSM is healthy
fn serial_number(&self) -> Result<SerialNumber, ConnectionError>
[src]
fn serial_number(&self) -> Result<SerialNumber, ConnectionError>
Get the serial number for the current YubiHSM2 (if available)
impl Into<Box<Connector>> for UsbConnector
[src]
impl Into<Box<Connector>> for UsbConnector
Auto Trait Implementations
impl Send for UsbConnector
impl Send for UsbConnector
impl Sync for UsbConnector
impl Sync for UsbConnector