pub struct SelectorUnit { /* private fields */ }Implementations§
Source§impl SelectorUnit
impl SelectorUnit
Sourcepub fn parse(interface: u8, bytes: &[u8]) -> Result<Self, InvalidRoute>
pub fn parse(interface: u8, bytes: &[u8]) -> Result<Self, InvalidRoute>
Parse exactly one UAC2 Selector Unit descriptor (subtype 0x05). This reports descriptor capabilities, not empirically tested hardware.
Sourcepub fn parse_uac1(interface: u8, bytes: &[u8]) -> Result<Self, InvalidRoute>
pub fn parse_uac1(interface: u8, bytes: &[u8]) -> Result<Self, InvalidRoute>
UAC1 selectors have mandatory GET_CUR/SET_CUR and no access bitmap.
Sourcepub fn parse_adc3(interface: u8, bytes: &[u8]) -> Result<Self, InvalidRoute>
pub fn parse_adc3(interface: u8, bytes: &[u8]) -> Result<Self, InvalidRoute>
Full ADC3 Selector Unit, including its 32-bit access field.
pub fn entity(&self) -> Entity
pub fn sources(&self) -> &[u8] ⓘ
pub fn access(&self) -> Access
Trait Implementations§
Source§impl Clone for SelectorUnit
impl Clone for SelectorUnit
Source§impl Debug for SelectorUnit
impl Debug for SelectorUnit
impl Eq for SelectorUnit
Source§impl PartialEq for SelectorUnit
impl PartialEq for SelectorUnit
impl StructuralPartialEq for SelectorUnit
Auto Trait Implementations§
impl Forget for SelectorUnit
impl Freeze for SelectorUnit
impl Move for SelectorUnit
impl RefUnwindSafe for SelectorUnit
impl Send for SelectorUnit
impl Sync for SelectorUnit
impl Unpin for SelectorUnit
impl UnsafeUnpin for SelectorUnit
impl UnwindSafe for SelectorUnit
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