#[non_exhaustive]pub struct UsbInterface {
pub interface_number: u8,
pub alternate: UsbAlternateInterface,
pub alternates: Vec<UsbAlternateInterface>,
pub claimed: bool,
}Expand description
A USB interface grouping one or more alternate settings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.interface_number: u8The interface number.
alternate: UsbAlternateInterfaceThe currently selected alternate configuration of this interface.
By default this is the UsbAlternateInterface from alternates with
UsbAlternateInterface::alternate_setting equal to 0.
It can be changed by calling OpenUsbDevice::select_alternate_interface
with any other value found in UsbInterface::alternates
alternates: Vec<UsbAlternateInterface>The alternate configuration possible for this interface.
Use OpenUsbDevice::select_alternate_interface to select an alternate
configuration.
claimed: boolReturns whether or not this interface has been claimed by the current web page.
Trait Implementations§
Source§impl Clone for UsbInterface
impl Clone for UsbInterface
Source§fn clone(&self) -> UsbInterface
fn clone(&self) -> UsbInterface
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UsbInterface
impl Debug for UsbInterface
Source§impl From<&UsbInterface> for UsbInterface
impl From<&UsbInterface> for UsbInterface
Source§fn from(iface: &UsbInterface) -> Self
fn from(iface: &UsbInterface) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UsbInterface
impl RefUnwindSafe for UsbInterface
impl Send for UsbInterface
impl Sync for UsbInterface
impl Unpin for UsbInterface
impl UnwindSafe for UsbInterface
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