Trait yubihsm::connector::Connector [−][src]
pub trait Connector: Send + Sync { fn connect(&self) -> Result<Box<Connection>, ConnectionError>; fn healthcheck(&self) -> Result<(), ConnectionError>; fn serial_number(&self) -> Result<SerialNumber, ConnectionError>; }
Connectors which create Connection
objects to the HSM
Required Methods
fn connect(&self) -> Result<Box<Connection>, ConnectionError>
Open a connection to the HSM using this Connector
fn healthcheck(&self) -> Result<(), ConnectionError>
Ensure the connection to the HSM is healthy, or return an error
fn serial_number(&self) -> Result<SerialNumber, ConnectionError>
Get the serial number for the HSM (if available)
Implementors
impl Connector for HttpConnector
impl Connector for UsbConnector
impl Connector for MockHsm