Struct rusb::Context [−][src]
pub struct Context { /* fields omitted */ }
Expand description
A libusb
context.
Implementations
Trait Implementations
Get the raw libusb_context pointer, for advanced use in unsafe code.
Returns a list of the current USB devices.
fn open_device_with_vid_pid(
&self,
vendor_id: u16,
product_id: u16
) -> Option<DeviceHandle<Self>>
fn open_device_with_vid_pid(
&self,
vendor_id: u16,
product_id: u16
) -> Option<DeviceHandle<Self>>
Convenience function to open a device by its vendor ID and product ID. Read more
Opens the device with a pre-opened file descriptor. Read more
Sets the log level of a libusb
for context.
Use HotplugBuilder
Register a callback to be called on hotplug events. The callback’s Hotplug::device_arrived method is called when a new device is added to the bus, and Hotplug::device_left is called when it is removed. Read more
Unregisters the callback corresponding to the given registration. The same thing can be achieved by dropping the registration. Read more
Interrupt any active thread that is handling events (for example with handle_events). Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more