pub struct Context { /* private fields */ }
Expand description
A libusb
context.
Implementations
sourceimpl Context
impl Context
sourcepub fn set_log_level(&mut self, level: LogLevel)
pub fn set_log_level(&mut self, level: LogLevel)
Sets the log level of a libusb
context.
pub fn has_capability(&self) -> bool
sourcepub fn has_hotplug(&self) -> bool
pub fn has_hotplug(&self) -> bool
Tests whether the running libusb
library supports hotplug.
sourcepub fn has_hid_access(&self) -> bool
pub fn has_hid_access(&self) -> bool
Tests whether the running libusb
library has HID access.
sourcepub fn supports_detach_kernel_driver(&self) -> bool
pub fn supports_detach_kernel_driver(&self) -> bool
Tests whether the running libusb
library supports detaching the kernel driver.
sourcepub fn devices(&'a mut self) -> Result<DeviceList<'a>, Error>
pub 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
Auto Trait Implementations
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more