pub struct RusbContext {}Expand description
Represents a backend using the rusb crate.
Implementations§
Source§impl RusbContext
impl RusbContext
Trait Implementations§
Source§impl Default for RusbContext
impl Default for RusbContext
Source§fn default() -> RusbContext
fn default() -> RusbContext
Returns the “default value” for a type. Read more
Source§impl UsbContext for RusbContext
impl UsbContext for RusbContext
Source§fn device_by_id_with_timeout(
&self,
usb_vid: u16,
usb_pid: u16,
usb_serial: Option<&str>,
timeout: Duration,
) -> Result<Box<dyn UsbDevice>>
fn device_by_id_with_timeout( &self, usb_vid: u16, usb_pid: u16, usb_serial: Option<&str>, timeout: Duration, ) -> Result<Box<dyn UsbDevice>>
Find a device by VID:PID, and optionally disambiguate by serial number.
fn device_by_interface_with_timeout( &self, class: u8, subclass: u8, protocol: u8, usb_serial: Option<&str>, timeout: Duration, ) -> Result<Box<dyn UsbDevice>>
Auto Trait Implementations§
impl Freeze for RusbContext
impl RefUnwindSafe for RusbContext
impl Send for RusbContext
impl Sync for RusbContext
impl Unpin for RusbContext
impl UnwindSafe for RusbContext
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