Trait yubihsm::connector::Connector[][src]

pub trait Connector: Sized + Send + Sync {
    type Config: Debug + Default + Display;
    fn open(config: Self::Config) -> Result<Self, ConnectorError>;
fn reconnect(&self) -> Result<(), ConnectorError>;
fn status(&self) -> Result<Status, ConnectorError>;
fn send_command(
        &self,
        uuid: Uuid,
        cmd: Vec<u8>
    ) -> Result<Vec<u8>, ConnectorError>; }

API for communicating with a yubihsm-connector

Associated Types

Configuration options for this connector

Required Methods

Open a connection to a yubihsm-connector

Reconnect to yubihsm-connector, closing the existing connection

GET /connector/status returning the result as connector::Status

POST /connector/api with a given command message and return the response message

Implementors