pub struct ClockSelectorDescriptor {
pub clock_id: u8,
pub source_ids: Vec<u8, MAX_CLOCK_DESCRIPTORS>,
pub controls_bitmap: u8,
pub clock_name: StringIndex,
}Expand description
Clock selector descriptor for selecting between multiple clock sources. (USB Audio Devices 2.0 §4.7.2.2)
Fields§
§clock_id: u8Unique identifier for this clock selector.
source_ids: Vec<u8, MAX_CLOCK_DESCRIPTORS>List of source clock IDs that can be selected.
controls_bitmap: u8Bitmap of supported controls.
clock_name: StringIndexIndex of string descriptor describing this clock selector.
Implementations§
Source§impl ClockSelectorDescriptor
impl ClockSelectorDescriptor
Sourcepub const SUPPORTED_SOURCE_IDS: u8 = 8u8
pub const SUPPORTED_SOURCE_IDS: u8 = 8u8
Maximum number of source ids that we support (at most 248).
Trait Implementations§
Source§impl Clone for ClockSelectorDescriptor
impl Clone for ClockSelectorDescriptor
Source§fn clone(&self) -> ClockSelectorDescriptor
fn clone(&self) -> ClockSelectorDescriptor
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 ClockSelectorDescriptor
impl Debug for ClockSelectorDescriptor
Source§impl Format for ClockSelectorDescriptor
impl Format for ClockSelectorDescriptor
Source§impl PartialEq for ClockSelectorDescriptor
impl PartialEq for ClockSelectorDescriptor
Source§impl USBDescriptor for ClockSelectorDescriptor
impl USBDescriptor for ClockSelectorDescriptor
type Error = AudioInterfaceError
fn try_from_bytes(bytes: &[u8]) -> Result<Self, AudioInterfaceError>
Source§impl VariableSizeDescriptor for ClockSelectorDescriptor
impl VariableSizeDescriptor for ClockSelectorDescriptor
Source§fn match_bytes_len(bytes: &[u8]) -> bool
fn match_bytes_len(bytes: &[u8]) -> bool
Matches length with the number of source ids.
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 WritableDescriptor for ClockSelectorDescriptor
impl WritableDescriptor for ClockSelectorDescriptor
impl Eq for ClockSelectorDescriptor
impl StructuralPartialEq for ClockSelectorDescriptor
Auto Trait Implementations§
impl Freeze for ClockSelectorDescriptor
impl RefUnwindSafe for ClockSelectorDescriptor
impl Send for ClockSelectorDescriptor
impl Sync for ClockSelectorDescriptor
impl Unpin for ClockSelectorDescriptor
impl UnwindSafe for ClockSelectorDescriptor
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