pub struct FrameWriter<'a, 'd, D: Driver<'d>> { /* private fields */ }Expand description
Streaming writer for a single UVC video or still image frame.
Implementations§
Source§impl<'a, 'd, D: Driver<'d>> FrameWriter<'a, 'd, D>
impl<'a, 'd, D: Driver<'d>> FrameWriter<'a, 'd, D>
Sourcepub async fn write(&mut self, chunk: &[u8]) -> Result<(), EndpointError>
pub async fn write(&mut self, chunk: &[u8]) -> Result<(), EndpointError>
Writes a chunk of frame payload bytes, flushing full packets as needed.
Sourcepub async fn finish(self) -> Result<(), EndpointError>
pub async fn finish(self) -> Result<(), EndpointError>
Finishes the frame by sending the final packet with EOF set (and a ZLP for Bulk if needed).
Sourcepub async fn abort(self) -> Result<(), EndpointError>
pub async fn abort(self) -> Result<(), EndpointError>
Aborts the frame by sending the final packet with ERR | EOF set so the host discards it.
Auto Trait Implementations§
impl<'a, 'd, D> !UnwindSafe for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> Forget for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> Freeze for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> Move for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> RefUnwindSafe for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> Send for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> Sync for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> Unpin for FrameWriter<'a, 'd, D>
impl<'a, 'd, D> UnsafeUnpin for FrameWriter<'a, '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