pub struct AudioSourceEpOut<'d, D: Driver<'d>> { /* private fields */ }Expand description
Used for reading audio data from the host to the device.
Implementations§
Source§impl<'d, D: Driver<'d>> AudioSourceEpOut<'d, D>
impl<'d, D: Driver<'d>> AudioSourceEpOut<'d, D>
Sourcepub async fn read(&mut self, buffer: &mut [u8]) -> Result<usize, EndpointError>
pub async fn read(&mut self, buffer: &mut [u8]) -> Result<usize, EndpointError>
Read audio data from the endpoint.
Sourcepub async fn wait_enabled(&mut self)
pub async fn wait_enabled(&mut self)
Wait until the endpoint is enabled by the host (i.e., after the host sets the alternate setting with this endpoint). This is critical to call before writing to the endpoint, otherwise writes will fail with EndpointError::Disabled. The endpoint will be disabled again when the host deactivates the streaming interface or unconfigures the device.
Auto Trait Implementations§
impl<'d, D> Freeze for AudioSourceEpOut<'d, D>
impl<'d, D> RefUnwindSafe for AudioSourceEpOut<'d, D>
impl<'d, D> Send for AudioSourceEpOut<'d, D>
impl<'d, D> Sync for AudioSourceEpOut<'d, D>
impl<'d, D> Unpin for AudioSourceEpOut<'d, D>
impl<'d, D> UnwindSafe for AudioSourceEpOut<'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