pub struct Device {
pub product_name: String,
pub serial_number: SerialNumber,
/* private fields */
}
Available on crate feature
usb
only.Expand description
A USB device we’ve identified as a YubiHSM 2
Fields§
§product_name: String
Product vendor and name
serial_number: SerialNumber
Serial number of the YubiHSM 2 device
Implementations§
source§impl Device
impl Device
sourcepub fn open(self, timeout: UsbTimeout) -> Result<UsbConnection, Error>
pub fn open(self, timeout: UsbTimeout) -> Result<UsbConnection, Error>
Open this device, consuming it and creating a UsbConnection
sourcepub fn bus_number(&self) -> u8
pub fn bus_number(&self) -> u8
Get the bus number for this device
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more