pub enum Context<'a> {
Custom(Box<dyn ContextTrait<'a, Device = Device<'a>> + Send + 'a>),
V4l2(Context),
}
Expand description
Platform context
Leaky abstraction: if you require access to platform specific features, match the enum instance to get the underlying HAL implementation.
A context is used to query platform properties, available devices and more.
Variants§
Custom(Box<dyn ContextTrait<'a, Device = Device<'a>> + Send + 'a>)
Can be used to wrap your own struct
V4l2(Context)
Video4Linux2 context
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> !UnwindSafe for Context<'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