pub struct LineInStream<'d, D: Driver<'d>> { /* private fields */ }Expand description
Line in stream (device to host, isochronous IN endpoint).
Implementations§
Source§impl<'d, D: Driver<'d>> LineInStream<'d, D>
impl<'d, D: Driver<'d>> LineInStream<'d, D>
Sourcepub async fn ready(
&mut self,
) -> Result<<D::EndpointIn as IsoEndpointIn>::Slot<'_>, EndpointDisabledError>where
D::EndpointIn: IsoEndpointIn,
pub async fn ready(
&mut self,
) -> Result<<D::EndpointIn as IsoEndpointIn>::Slot<'_>, EndpointDisabledError>where
D::EndpointIn: IsoEndpointIn,
Wait until the next audio packet can be queued, returning a reserved slot.
IsoInSlot::skipped reports how many intervals this
writer left empty, so a late task can advance its stream instead of building a packet per
missed interval.
Sourcepub async fn write_packet(
&mut self,
data: &[u8],
) -> Result<Option<NonZeroU32>, IsoWriteError>where
D::EndpointIn: IsoEndpointIn,
pub async fn write_packet(
&mut self,
data: &[u8],
) -> Result<Option<NonZeroU32>, IsoWriteError>where
D::EndpointIn: IsoEndpointIn,
Writes one audio packet for the next service interval.
Returns how many intervals were skipped before this packet, if any. When the samples
depend on timing or skipped intervals, call ready first, build them, and
submit with IsoInSlot::write. A packet the host does
not poll for is dropped rather than sent late.
Sourcepub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the host to select the streaming alternate setting.
Sourcepub fn endpoint_index(&self) -> usize
pub fn endpoint_index(&self) -> usize
The isochronous IN endpoint’s index.
Auto Trait Implementations§
impl<'d, D> Forget for LineInStream<'d, D>
impl<'d, D> Freeze for LineInStream<'d, D>
impl<'d, D> Move for LineInStream<'d, D>
impl<'d, D> RefUnwindSafe for LineInStream<'d, D>
impl<'d, D> Send for LineInStream<'d, D>
impl<'d, D> Sync for LineInStream<'d, D>
impl<'d, D> Unpin for LineInStream<'d, D>
impl<'d, D> UnsafeUnpin for LineInStream<'d, D>
impl<'d, D> UnwindSafe for LineInStream<'d, D>
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