[−][src]Struct rusb::Device
A reference to a USB device.
Methods
impl<T: UsbContext> Device<T>
[src]
pub fn as_raw(&self) -> *mut libusb_device
[src]
Get the raw libusb_device pointer, for advanced use in unsafe code
pub fn device_descriptor(&self) -> Result<DeviceDescriptor>
[src]
Reads the device descriptor.
pub fn config_descriptor(&self, config_index: u8) -> Result<ConfigDescriptor>
[src]
Reads a configuration descriptor.
pub fn active_config_descriptor(&self) -> Result<ConfigDescriptor>
[src]
Reads the configuration descriptor for the current configuration.
pub fn bus_number(&self) -> u8
[src]
Returns the number of the bus that the device is connected to.
pub fn address(&self) -> u8
[src]
Returns the device's address on the bus that it's connected to.
pub fn speed(&self) -> Speed
[src]
Returns the device's connection speed.
pub fn open(&self) -> Result<DeviceHandle<T>>
[src]
Opens the device.
pub fn port_number(&self) -> u8
[src]
Returns the device's port number
Trait Implementations
impl<T: UsbContext> Debug for Device<T>
[src]
impl<T: UsbContext> Drop for Device<T>
[src]
impl<T: Eq + UsbContext> Eq for Device<T>
[src]
impl<T: PartialEq + UsbContext> PartialEq<Device<T>> for Device<T>
[src]
impl<T: UsbContext> Send for Device<T>
[src]
impl<T: UsbContext> StructuralEq for Device<T>
[src]
impl<T: UsbContext> StructuralPartialEq for Device<T>
[src]
impl<T: UsbContext> Sync for Device<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Device<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Unpin for Device<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Device<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,