pub struct IoBox<'d, D: Driver<'d>, const N: usize> {
pub line_out: LineOutStream<'d, D>,
pub line_in: LineInStream<'d, D>,
pub feedback: Feedback<'d, D>,
pub interrupt: Option<Interrupt<'d, D, N>>,
pub control_monitor: ControlMonitor<'d, N>,
}Expand description
USB Audio Class 2.0 I/O box: line out + line in with explicit feedback.
Fields§
§line_out: LineOutStream<'d, D>Line out stream (host to device).
line_in: LineInStream<'d, D>Line in stream (device to host).
feedback: Feedback<'d, D>Line out’s explicit feedback endpoint.
interrupt: Option<Interrupt<'d, D, N>>The AudioControl interrupt endpoint, if Config::interrupt_endpoint is set.
control_monitor: ControlMonitor<'d, N>Control monitor.
Implementations§
Source§impl<'d, D: Driver<'d>, const N: usize> IoBox<'d, D, N>
impl<'d, D: Driver<'d>, const N: usize> IoBox<'d, D, N>
Sourcepub fn new(
builder: &mut Builder<'d, D>,
state: &'d mut State<'d, N>,
config: Config<'d, N>,
) -> Self
pub fn new( builder: &mut Builder<'d, D>, state: &'d mut State<'d, N>, config: Config<'d, N>, ) -> Self
Creates a new IoBox function.
§Panics
If there is no sample rate or more than ten, no channel in a direction, a direction
whose packets (max_packet_size) exceed the isochronous limit (1023 bytes at full
speed, 1024 at high speed), a nonempty feature unit without one entry for the master and
each channel, or with more than 62, unsupported control bits, or a control_buf too
small for the sample rate list.
Auto Trait Implementations§
impl<'d, D, const N: usize> !RefUnwindSafe for IoBox<'d, D, N>
impl<'d, D, const N: usize> !UnwindSafe for IoBox<'d, D, N>
impl<'d, D, const N: usize> Forget for IoBox<'d, D, N>
impl<'d, D, const N: usize> Freeze for IoBox<'d, D, N>where
LineOutStream<'d, D>: Freeze,
LineInStream<'d, D>: Freeze,
Feedback<'d, D>: Freeze,
Option<Interrupt<'d, D, N>>: Freeze,
ControlMonitor<'d, N>: Freeze,
impl<'d, D, const N: usize> Move for IoBox<'d, D, N>
impl<'d, D, const N: usize> Send for IoBox<'d, D, N>where
LineOutStream<'d, D>: Send,
LineInStream<'d, D>: Send,
Feedback<'d, D>: Send,
Option<Interrupt<'d, D, N>>: Send,
ControlMonitor<'d, N>: Send,
impl<'d, D, const N: usize> Sync for IoBox<'d, D, N>where
LineOutStream<'d, D>: Sync,
LineInStream<'d, D>: Sync,
Feedback<'d, D>: Sync,
Option<Interrupt<'d, D, N>>: Sync,
ControlMonitor<'d, N>: Sync,
impl<'d, D, const N: usize> Unpin for IoBox<'d, D, N>where
LineOutStream<'d, D>: Unpin,
LineInStream<'d, D>: Unpin,
Feedback<'d, D>: Unpin,
Option<Interrupt<'d, D, N>>: Unpin,
ControlMonitor<'d, N>: Unpin,
impl<'d, D, const N: usize> UnsafeUnpin for IoBox<'d, D, N>where
LineOutStream<'d, D>: UnsafeUnpin,
LineInStream<'d, D>: UnsafeUnpin,
Feedback<'d, D>: UnsafeUnpin,
Option<Interrupt<'d, D, N>>: UnsafeUnpin,
ControlMonitor<'d, N>: UnsafeUnpin,
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