Struct yubihsm::mockhsm::MockHsm [−][src]
pub struct MockHsm(_);
Software simulation of a YubiHSM2
intended for testing
implemented as a yubihsm::Connection
.
This only implements a subset of the YubiHSM's functionality, and does not enforce access control. It's recommended to also test live against a real device.
To enable, make sure to build yubihsm.rs with the mockhsm
cargo feature
Methods
impl MockHsm
[src]
impl MockHsm
Trait Implementations
impl Clone for MockHsm
[src]
impl Clone for MockHsm
fn clone(&self) -> MockHsm
[src]
fn clone(&self) -> MockHsm
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for MockHsm
[src]
impl Debug for MockHsm
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 Connector for MockHsm
[src]
impl Connector for MockHsm
fn connect(&self) -> Result<Box<Connection>, ConnectionError>
[src]
fn connect(&self) -> Result<Box<Connection>, ConnectionError>
Create a new connection with a clone of the MockHsm state
fn healthcheck(&self) -> Result<(), ConnectionError>
[src]
fn healthcheck(&self) -> Result<(), ConnectionError>
Rust never sleeps
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 Default for MockHsm
[src]
impl Default for MockHsm
impl Into<Box<Connector>> for MockHsm
[src]
impl Into<Box<Connector>> for MockHsm