pub enum Device<'a> {
Custom(Box<dyn DeviceTrait<'a, Stream = Stream<'a>> + Send + 'a>),
V4l2(Handle),
}Expand description
Platform device
Leaky abstraction: if you require access to platform specific features, match the enum instance to get the underlying HAL implementation.
A device is used to read/write control properties, start video streams and more.
Variants§
Custom(Box<dyn DeviceTrait<'a, Stream = Stream<'a>> + Send + 'a>)
Can be used to wrap your own struct
V4l2(Handle)
Video4Linux2 device handle
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Device<'a>
impl<'a> !RefUnwindSafe for Device<'a>
impl<'a> Send for Device<'a>
impl<'a> !Sync for Device<'a>
impl<'a> Unpin for Device<'a>
impl<'a> !UnwindSafe for Device<'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