[−][src]Struct yubihsm::connector::usb::Devices
A collection of detected YubiHSM 2 devices, represented as Device
Methods
impl Devices
[src]
pub fn serial_numbers() -> Result<Vec<SerialNumber>, ConnectionError>
[src]
Return the serial numbers of all connected YubiHSM 2s
pub fn open(
serial_number: Option<SerialNumber>,
timeout: UsbTimeout
) -> Result<UsbConnection, ConnectionError>
[src]
serial_number: Option<SerialNumber>,
timeout: UsbTimeout
) -> Result<UsbConnection, ConnectionError>
Open a YubiHSM 2, either selecting one with a particular serial number
or opening the only available one if None
there is only one connected
pub fn detect(timeout: UsbTimeout) -> Result<Self, ConnectionError>
[src]
Detect connected YubiHSM 2s, returning a collection of them
pub fn len(&self) -> usize
[src]
Number of detected devices
pub fn is_empty(&self) -> bool
[src]
Did we fail to find any YubiHSM 2 devices?
pub fn as_slice(&self) -> &[Device]
[src]
Borrow the detected devices as a slice
pub fn iter(&self) -> Iter<Device>
[src]
Iterate over the detected YubiHSM 2s
Trait Implementations
impl IntoIterator for Devices
[src]
Auto Trait Implementations
Blanket Implementations
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self