pub struct UsbConfig {
pub serial: Option<SerialNumber>,
pub timeout_ms: u64,
}
Available on crate feature
usb
only.Expand description
Configuration for connecting to the YubiHSM via USB
Fields
serial: Option<SerialNumber>
Serial number of the YubiHSM to connect to
timeout_ms: u64
Timeout for USB operations (default 1s)
Implementations
sourceimpl UsbConfig
impl UsbConfig
sourcepub const DEFAULT_TIMEOUT_MILLIS: u64 = 30_000u64
pub const DEFAULT_TIMEOUT_MILLIS: u64 = 30_000u64
Default timeout for USB communication (30 seconds)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for UsbConfig
impl<'de> Deserialize<'de> for UsbConfig
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for UsbConfig
impl Send for UsbConfig
impl Sync for UsbConfig
impl Unpin for UsbConfig
impl UnwindSafe for UsbConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more