fractal::components::camera

Trait CameraExt

Source
pub trait CameraExt {
    // Required methods
    async fn has_cameras() -> bool;
    async fn viewfinder() -> Option<CameraViewfinder>;
}
Expand description

Trait implemented by camera backends.

Required Methods§

Source

async fn has_cameras() -> bool

Whether any cameras are available.

Source

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.

Implementors§