pub trait BackendDevice: Send + 'static {
// Required methods
fn capabilities(&self) -> CameraResult<DeviceCapabilities>;
fn start(&mut self, sink: FrameSink, plan: &CapturePlan) -> CameraResult<()>;
fn stop(&mut self) -> CameraResult<()>;
}Expand description
A device handle may keep native thread-affine objects inside its own worker. Calls are serialized by the framework and never occur on the per-frame path.
Required Methods§
Sourcefn capabilities(&self) -> CameraResult<DeviceCapabilities>
fn capabilities(&self) -> CameraResult<DeviceCapabilities>
Returns capture modes and controls supported by this device.
Sourcefn start(&mut self, sink: FrameSink, plan: &CapturePlan) -> CameraResult<()>
fn start(&mut self, sink: FrameSink, plan: &CapturePlan) -> CameraResult<()>
Starts native capture and publishes frames into the supplied bounded sink.
Sourcefn stop(&mut self) -> CameraResult<()>
fn stop(&mut self) -> CameraResult<()>
Stops native capture and releases streaming resources.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".