pub trait CameraStream {
type Frame<'a>: Frame
where Self: 'a;
type Error: Error;
// Required methods
fn start<F>(&mut self, callback: F) -> Result<(), Self::Error>
where F: FnMut(&Self::Frame<'_>) + Send + 'static;
fn stop(&mut self) -> Result<(), Self::Error>;
}Expand description
Callback-based frame delivery.
Required Associated Types§
Required Methods§
Sourcefn start<F>(&mut self, callback: F) -> Result<(), Self::Error>
fn start<F>(&mut self, callback: F) -> Result<(), Self::Error>
Start streaming. Callback is invoked on a platform thread for each frame.
fn stop(&mut self) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.