pub enum Stream<'a> {
Custom(Box<dyn for<'b> StreamTrait<'b, Item = Result<&'b [u8]>> + Send + 'a>),
V4l2(Handle<'a>),
}
Expand description
Platform stream
Leaky abstraction: if you require access to platform specific features, match the enum instance to get the underlying HAL implementation.
A stream is used read frames from a camera device. Many HAL implementations feature advanced I/O method such as memory mapped streaming, DMA and more. We attempt to automatically select the best method available.
Variants§
Custom(Box<dyn for<'b> StreamTrait<'b, Item = Result<&'b [u8]>> + Send + 'a>)
Can be used to wrap your own struct
V4l2(Handle<'a>)
Video4Linux2 stream handle
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Stream<'a>
impl<'a> Send for Stream<'a>
impl<'a> !Sync for Stream<'a>
impl<'a> Unpin for Stream<'a>
impl<'a> !UnwindSafe for Stream<'a>
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