Struct libusb::Context [] [src]

pub struct Context { /* fields omitted */ }

A libusb context.

Methods

impl Context
[src]

Opens a new libusb context.

Sets the log level of a libusb context.

Tests whether the running libusb library supports hotplug.

Tests whether the running libusb library has HID access.

Tests whether the running libusb library supports detaching the kernel driver.

Returns a list of the current USB devices. The context must outlive the device list.

Convenience function to open a device by its vendor ID and product ID.

This function is provided as a convenience for building prototypes without having to iterate a DeviceList. It is not meant for production applications.

Returns a device handle for the first device found matching vendor_id and product_id. On error, or if the device could not be found, it returns None.

Trait Implementations

impl Drop for Context
[src]

Closes the libusb context.

impl Sync for Context
[src]

impl Send for Context
[src]