Struct yubihsm::UsbDevices [−][src]
pub struct UsbDevices(_);
A collection of detected YubiHSM 2 devices, represented as HsmDevice
Methods
impl UsbDevices
[src]
impl UsbDevices
pub fn serial_numbers() -> Result<Vec<SerialNumber>, AdapterError>
[src]
pub fn serial_numbers() -> Result<Vec<SerialNumber>, AdapterError>
Return the serial numbers of all connected YubiHSM2s
pub fn open(
serial_number: Option<SerialNumber>,
timeout: UsbTimeout
) -> Result<UsbAdapter, AdapterError>
[src]
pub fn open(
serial_number: Option<SerialNumber>,
timeout: UsbTimeout
) -> Result<UsbAdapter, AdapterError>
Open a YubiHSM2, either selecting one with a particular serial number
or opening the only available one if None
there is only one connected
pub fn new(timeout: UsbTimeout) -> Result<Self, AdapterError>
[src]
pub fn new(timeout: UsbTimeout) -> Result<Self, AdapterError>
Detect connected YubiHSM 2s, returning a collection of them
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Number of detected devices
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Did we fail to find any YubiHSM2 devices?
pub fn as_slice(&self) -> &[HsmDevice]
[src]
pub fn as_slice(&self) -> &[HsmDevice]
Borrow the detected devices as a slice
ⓘImportant traits for Iter<'a, T>pub fn iter(&self) -> Iter<HsmDevice>
[src]
ⓘImportant traits for Iter<'a, T>
pub fn iter(&self) -> Iter<HsmDevice>
Iterate over the detected YubiHSM 2s
Trait Implementations
impl IntoIterator for UsbDevices
[src]
impl IntoIterator for UsbDevices
Auto Trait Implementations
impl Send for UsbDevices
impl Send for UsbDevices
impl Sync for UsbDevices
impl Sync for UsbDevices