pub trait CameraDevice {
type Stream: CameraStream;
type Error: Error;
// Required methods
fn id(&self) -> &str;
fn name(&self) -> &str;
fn supported_formats(
&self,
) -> Result<impl Iterator<Item = FormatDescriptor>, Self::Error>;
fn open(self, config: &StreamConfig) -> Result<Self::Stream, Self::Error>;
}Expand description
A camera device that can be inspected and opened.
Required Associated Types§
Required Methods§
fn id(&self) -> &str
fn name(&self) -> &str
fn supported_formats( &self, ) -> Result<impl Iterator<Item = FormatDescriptor>, Self::Error>
fn open(self, config: &StreamConfig) -> Result<Self::Stream, 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.