pub struct Stream<'d, D: Driver<'d>> { /* private fields */ }Expand description
Used for writing audio frames.
Implementations§
Source§impl<'d, D: Driver<'d>> Stream<'d, D>
impl<'d, D: Driver<'d>> Stream<'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 packet can be queued, returning a reserved slot.
IsoInSlot::skipped reports how many intervals this
writer left empty before this slot.
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 packet for the next service interval.
Returns how many intervals were skipped before this packet, if any. When the packet
contents depend on timing or skipped intervals, call ready first, build
the packet, and submit it 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 USB host to enable this interface: it is listening.
Auto Trait Implementations§
impl<'d, D> Forget for Stream<'d, D>
impl<'d, D> Freeze for Stream<'d, D>
impl<'d, D> Move for Stream<'d, D>
impl<'d, D> RefUnwindSafe for Stream<'d, D>
impl<'d, D> Send for Stream<'d, D>
impl<'d, D> Sync for Stream<'d, D>
impl<'d, D> Unpin for Stream<'d, D>
impl<'d, D> UnsafeUnpin for Stream<'d, D>
impl<'d, D> UnwindSafe for Stream<'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