pub struct InterfaceDescriptor<'a> {
pub len: u8,
pub descriptor_type: u8,
pub interface_number: u8,
pub alternate_setting: u8,
pub num_endpoints: u8,
pub interface_class: u8,
pub interface_subclass: u8,
pub interface_protocol: u8,
pub interface_name: StringIndex,
pub buffer: &'a [u8],
}Expand description
USB Interface Descriptor with a reference to the trailing sub-descriptor buffer.
Fields§
§len: u8§descriptor_type: u8§interface_number: u8§alternate_setting: u8§num_endpoints: u8§interface_class: u8§interface_subclass: u8§interface_protocol: u8§interface_name: StringIndex§buffer: &'a [u8]All bytes following this descriptor up to (but not including) the next interface descriptor.
Implementations§
Source§impl<'a> InterfaceDescriptor<'a>
impl<'a> InterfaceDescriptor<'a>
Sourcepub fn iter_descriptors(&self) -> RawDescriptorIterator<'_> ⓘ
pub fn iter_descriptors(&self) -> RawDescriptorIterator<'_> ⓘ
Iterate over raw descriptors inside this interface.
Sourcepub fn iter_endpoints(&'a self) -> EndpointIterator<'a> ⓘ
pub fn iter_endpoints(&'a self) -> EndpointIterator<'a> ⓘ
Iterate over endpoint descriptors inside this interface.
Trait Implementations§
Source§impl<'a> Clone for InterfaceDescriptor<'a>
impl<'a> Clone for InterfaceDescriptor<'a>
Source§fn clone(&self) -> InterfaceDescriptor<'a>
fn clone(&self) -> InterfaceDescriptor<'a>
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<'a> Debug for InterfaceDescriptor<'a>
impl<'a> Debug for InterfaceDescriptor<'a>
Source§impl<'a> Format for InterfaceDescriptor<'a>
impl<'a> Format for InterfaceDescriptor<'a>
impl<'a> Copy for InterfaceDescriptor<'a>
Auto Trait Implementations§
impl<'a> Freeze for InterfaceDescriptor<'a>
impl<'a> RefUnwindSafe for InterfaceDescriptor<'a>
impl<'a> Send for InterfaceDescriptor<'a>
impl<'a> Sync for InterfaceDescriptor<'a>
impl<'a> Unpin for InterfaceDescriptor<'a>
impl<'a> UnwindSafe for InterfaceDescriptor<'a>
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