Skip to main content

BackendProvider

Trait BackendProvider 

Source
pub trait BackendProvider:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn id(&self) -> BackendId;
    fn enumerate(&self) -> CameraResult<Vec<BackendDeviceInfo>>;
    fn open(&self, native_id: &str) -> CameraResult<Box<dyn BackendDevice>>;
}
Expand description

Behavior required by BackendProvider.

Required Methods§

Source

fn id(&self) -> BackendId

Returns the provider’s stable, namespaced backend identifier.

Source

fn enumerate(&self) -> CameraResult<Vec<BackendDeviceInfo>>

Enumerates devices without opening them.

Source

fn open(&self, native_id: &str) -> CameraResult<Box<dyn BackendDevice>>

Opens the device identified by an earlier enumeration result.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§