Struct linuxvideo::stream::ReadStream
source · [−]pub struct ReadStream { /* private fields */ }Expand description
A stream that reads data from a V4L2 device.
Implementations
sourceimpl ReadStream
impl ReadStream
sourcepub fn dequeue<T>(
&mut self,
cb: impl FnOnce(ReadBufferView<'_>) -> Result<T>
) -> Result<T>
pub fn dequeue<T>(
&mut self,
cb: impl FnOnce(ReadBufferView<'_>) -> Result<T>
) -> Result<T>
Dequeues a buffer, passes it to cb, then enqueues it again.
If cb returns an error, this function will still try to enqueue the buffer again. If that
fails, the error that occurred during enqueuing will be returned, if it succeeds, the error
returned by cb will be returned.
Trait Implementations
sourceimpl AsRawFd for ReadStream
impl AsRawFd for ReadStream
Auto Trait Implementations
impl RefUnwindSafe for ReadStream
impl Send for ReadStream
impl !Sync for ReadStream
impl Unpin for ReadStream
impl UnwindSafe for ReadStream
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more