Struct yubikey::Context
[−]
pub struct Context { // some fields omitted }
A libusb
context.
Methods
impl Context
fn new() -> Result<Context, Error>
Opens a new libusb
context.
fn set_log_level(&mut self, level: LogLevel)
Sets the log level of a libusb
context.
fn has_capability(&self) -> bool
fn has_hotplug(&self) -> bool
Tests whether the running libusb
library supports hotplug.
fn has_hid_access(&self) -> bool
Tests whether the running libusb
library has HID access.
fn supports_detach_kernel_driver(&self) -> bool
Tests whether the running libusb
library supports detaching the kernel driver.
fn devices(&'a mut self) -> Result<DeviceList<'a>, Error>
Returns a list of the current USB devices. The context must outlive the device list.
Trait Implementations
impl Drop for Context
fn drop(&mut self)
Closes the libusb
context.