Struct rusb::DeviceList[][src]

pub struct DeviceList<T: UsbContext> { /* fields omitted */ }
Expand description

A list of detected USB devices.

Implementations

impl DeviceList<GlobalContext>[src]

impl<T: UsbContext> DeviceList<T>[src]

pub fn new_with_context(context: T) -> Result<DeviceList<T>>[src]

pub fn len(&self) -> usize[src]

Returns the number of devices in the list.

pub fn is_empty(&self) -> bool[src]

Returns true if the list is empty, else returns false.

pub fn iter(&self) -> Devices<'_, T>

Notable traits for Devices<'a, T>

impl<'a, T: UsbContext> Iterator for Devices<'a, T> type Item = Device<T>;
[src]

Returns an iterator over the devices in the list.

The iterator yields a sequence of Device objects.

Trait Implementations

impl<T: UsbContext> Drop for DeviceList<T>[src]

fn drop(&mut self)[src]

Frees the device list.

Auto Trait Implementations

impl<T> RefUnwindSafe for DeviceList<T> where
    T: RefUnwindSafe

impl<T> !Send for DeviceList<T>

impl<T> !Sync for DeviceList<T>

impl<T> Unpin for DeviceList<T> where
    T: Unpin

impl<T> UnwindSafe for DeviceList<T> where
    T: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.