pub trait CameraExt {
// Required methods
async fn has_cameras() -> bool;
async fn viewfinder() -> Option<CameraViewfinder>;
}
Expand description
Trait implemented by camera backends.
Required Methods§
Sourceasync fn has_cameras() -> bool
async fn has_cameras() -> bool
Whether any cameras are available.
Sourceasync fn viewfinder() -> Option<CameraViewfinder>
async fn viewfinder() -> Option<CameraViewfinder>
Get a viewfinder displaying the output of the camera.
This method should try to get the permission to access cameras, and
return None
when it fails.
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.