[][src]Struct usbw::libusb::device_handle::DeviceHandle

pub struct DeviceHandle { /* fields omitted */ }

Implementations

impl DeviceHandle[src]

pub fn device(&self) -> Device[src]

pub fn inner(&self) -> NonNull<libusb_device_handle>[src]

pub fn active_configuration(&self) -> Result<u8, Error>[src]

Returns the active configuration number.

pub fn set_active_configuration(&mut self, config: u8) -> Result<(), Error>[src]

Sets the device's active configuration.

pub fn set_auto_detach_kernel_driver(&self, enabled: bool) -> Result<(), Error>[src]

pub fn control_read(
    &self,
    request_type: u8,
    request: u8,
    value: u16,
    index: u16,
    data: &mut [u8],
    timeout: Duration
) -> Result<usize, Error>
[src]

pub fn control_write(
    &self,
    request_type: u8,
    request: u8,
    value: u16,
    index: u16,
    data: &[u8],
    timeout: Duration
) -> Result<usize, Error>
[src]

pub fn bulk_write(
    &self,
    endpoint: u8,
    data: &[u8],
    timeout: Duration
) -> Result<usize, Error>
[src]

pub fn bulk_read(
    &self,
    endpoint: u8,
    data: &mut [u8],
    timeout: Duration
) -> Result<usize, Error>
[src]

pub fn interrupt_write(
    &self,
    endpoint: u8,
    data: &[u8],
    timeout: Duration
) -> Result<usize, Error>
[src]

pub fn interrupt_read(
    &self,
    endpoint: u8,
    data: &mut [u8],
    timeout: Duration
) -> Result<usize, Error>
[src]

pub fn claim_interface(&mut self, interface: u8) -> Result<(), Error>[src]

pub fn release_interface(&mut self, interface: u8) -> Result<(), Error>[src]

pub fn read_string_descriptor_ascii(&self, index: u8) -> Result<String, Error>[src]

pub const unsafe fn from_libusb(
    ptr: NonNull<libusb_device_handle>
) -> DeviceHandle
[src]

pub fn close(self)[src]

pub fn reset(&self) -> Result<(), Error>[src]

Trait Implementations

impl Debug for DeviceHandle[src]

impl Drop for DeviceHandle[src]

impl Send for DeviceHandle[src]

impl Sync for DeviceHandle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.