pub struct AudioClassBuilder { /* private fields */ }Expand description
Builder for AudioClass.
Use the fluent API to configure input/output streams, then call
build.
Implementations§
Source§impl AudioClassBuilder
impl AudioClassBuilder
Sourcepub fn input(self, cfg: StreamConfig) -> Self
pub fn input(self, cfg: StreamConfig) -> Self
Configure an input stream (device → host, e.g. microphone).
Calling multiple times replaces the previous configuration.
Sourcepub fn output(self, cfg: StreamConfig) -> Self
pub fn output(self, cfg: StreamConfig) -> Self
Configure an output stream (host → device, e.g. speaker / headphones).
Calling multiple times replaces the previous configuration.
Sourcepub fn build<B: UsbBus>(self, alloc: &UsbBusAllocator<B>) -> AudioClass<'_, B>
pub fn build<B: UsbBus>(self, alloc: &UsbBusAllocator<B>) -> AudioClass<'_, B>
Build the AudioClass, allocating endpoints and interfaces from alloc.
Trait Implementations§
Auto Trait Implementations§
impl Forget for AudioClassBuilder
impl Freeze for AudioClassBuilder
impl Move for AudioClassBuilder
impl RefUnwindSafe for AudioClassBuilder
impl Send for AudioClassBuilder
impl Sync for AudioClassBuilder
impl Unpin for AudioClassBuilder
impl UnsafeUnpin for AudioClassBuilder
impl UnwindSafe for AudioClassBuilder
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