pub struct InterfaceAltSetting<'a>(/* private fields */);Expand description
Information about a USB interface alternate setting, with access to associated endpoints and other descriptors.
An interface descriptor represents a single alternate setting of
an interface. Multiple interface descriptors with the same interface_number
but different alternate_setting values represent different alternate settings.
Implementations§
Source§impl<'a> InterfaceAltSetting<'a>
impl<'a> InterfaceAltSetting<'a>
Sourcepub fn descriptors(&self) -> Descriptors<'_> ⓘ
pub fn descriptors(&self) -> Descriptors<'_> ⓘ
Get the interface descriptor followed by all trailing endpoint and other descriptors up to the next interface descriptor.
Source§impl<'a> InterfaceAltSetting<'a>
impl<'a> InterfaceAltSetting<'a>
Sourcepub fn interface_number(&self) -> u8
pub fn interface_number(&self) -> u8
bInterfaceNumber descriptor field: Identifier for the interface.
Pass this to Device::claim_interface to work with the interface.
Sourcepub fn alternate_setting(&self) -> u8
pub fn alternate_setting(&self) -> u8
bAlternateSetting descriptor field: Identifier for this alternate setting.
Pass this to Interface::set_alt_setting to use this alternate setting.
Sourcepub fn num_endpoints(&self) -> u8
pub fn num_endpoints(&self) -> u8
bNumEndpoints descriptor field: Number of endpoints in this alternate setting.
Source§impl<'a> InterfaceAltSetting<'a>
impl<'a> InterfaceAltSetting<'a>
Sourcepub fn string_index(&self) -> Option<u8>
pub fn string_index(&self) -> Option<u8>
Index of the string descriptor describing this interface or alternate setting.
Trait Implementations§
Source§impl<'a> Clone for InterfaceAltSetting<'a>
impl<'a> Clone for InterfaceAltSetting<'a>
Source§fn clone(&self) -> InterfaceAltSetting<'a>
fn clone(&self) -> InterfaceAltSetting<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more