pub struct InterfaceAssociationDescriptor {
pub first_interface: u8,
pub num_interfaces: u8,
pub class: u8,
pub subclass: u8,
pub protocol: u8,
pub interface_name: StringIndex,
}Expand description
USB interface association descriptor for grouping related interfaces.
This descriptor is used to associate multiple interfaces that belong to the same function, such as an audio function with control and streaming interfaces. (USB Audio Devices 2.0 §4.6)
Fields§
§first_interface: u8First interface number in the association.
num_interfaces: u8Number of interfaces in the association.
class: u8Function class code.
subclass: u8Function subclass code.
protocol: u8Function protocol code.
interface_name: StringIndexIndex of string descriptor describing the function.
Implementations§
Source§impl InterfaceAssociationDescriptor
impl InterfaceAssociationDescriptor
Sourcepub fn is_audio_association(&self) -> bool
pub fn is_audio_association(&self) -> bool
Returns true if this interface association is for an audio function.
Trait Implementations§
Source§impl Clone for InterfaceAssociationDescriptor
impl Clone for InterfaceAssociationDescriptor
Source§fn clone(&self) -> InterfaceAssociationDescriptor
fn clone(&self) -> InterfaceAssociationDescriptor
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 ExtendableDescriptor for InterfaceAssociationDescriptor
impl ExtendableDescriptor for InterfaceAssociationDescriptor
Source§fn match_bytes(bytes: &[u8]) -> Result<(), DescriptorError>
fn match_bytes(bytes: &[u8]) -> Result<(), DescriptorError>
Matches
bytes with this descriptor. Read moreSource§fn prepare_bytes(bytes: &mut [u8], len: u8) -> Result<(), DescriptorError>where
Self: WritableDescriptor,
fn prepare_bytes(bytes: &mut [u8], len: u8) -> Result<(), DescriptorError>where
Self: WritableDescriptor,
Prepares
bytes to receive descriptor data. Read moreSource§impl Format for InterfaceAssociationDescriptorwhere
StringIndex: Format,
impl Format for InterfaceAssociationDescriptorwhere
StringIndex: Format,
Source§impl PartialEq for InterfaceAssociationDescriptor
impl PartialEq for InterfaceAssociationDescriptor
Source§fn eq(&self, other: &InterfaceAssociationDescriptor) -> bool
fn eq(&self, other: &InterfaceAssociationDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl USBDescriptor for InterfaceAssociationDescriptor
impl USBDescriptor for InterfaceAssociationDescriptor
type Error = DescriptorError
fn try_from_bytes(bytes: &[u8]) -> Result<Self, Self::Error>
Source§impl WritableDescriptor for InterfaceAssociationDescriptor
impl WritableDescriptor for InterfaceAssociationDescriptor
impl Copy for InterfaceAssociationDescriptor
impl Eq for InterfaceAssociationDescriptor
impl StructuralPartialEq for InterfaceAssociationDescriptor
Auto Trait Implementations§
impl Freeze for InterfaceAssociationDescriptor
impl RefUnwindSafe for InterfaceAssociationDescriptor
impl Send for InterfaceAssociationDescriptor
impl Sync for InterfaceAssociationDescriptor
impl Unpin for InterfaceAssociationDescriptor
impl UnwindSafe for InterfaceAssociationDescriptor
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