Skip to main content

CameraSystem

Struct CameraSystem 

Source
pub struct CameraSystem { /* private fields */ }
Expand description

Enumeration is isolated from the async executor. Explicit backend requests never fall back to another device namespace.

Implementations§

Source§

impl CameraSystem

Source

pub fn builder() -> SystemBuilder

Starts building a camera system with platform-default selection.

Source

pub fn new() -> Self

Creates a camera system using the platform-default backend policy.

Source

pub fn synthetic() -> Self

Deterministic, timer-driven RGB source for examples and hardware-free tests.

Source

pub fn backend_policy(&self) -> &BackendPolicy

Returns the configured backend selection policy.

Source

pub fn available_backends(&self) -> Vec<BackendId>

Lists compiled backends that support this target, including custom providers.

Source

pub fn backend_availability(&self, backend: &BackendId) -> BackendAvailability

Reports why a backend is available or unavailable in this build.

Source

pub fn permission_status( &self, backend: &BackendId, ) -> CameraResult<PermissionStatus>

Queries the authorization state without opening a device.

Source

pub async fn request_permission( &self, backend: &BackendId, ) -> CameraResult<bool>

Explicitly request a permission only where the backend owns a supported platform prompt. open never calls this method implicitly.

Source

pub fn devices_blocking(&self) -> CameraResult<Vec<DeviceInfo>>

Blocking enumeration for native worker threads and synchronous applications.

Source

pub fn capabilities_blocking( &self, id: &DeviceId, ) -> CameraResult<DeviceCapabilities>

Performs the capabilities_blocking operation.

Source

pub async fn devices(&self) -> CameraResult<Vec<DeviceInfo>>

Enumerates devices according to the configured backend policy.

Source

pub async fn capabilities( &self, id: &DeviceId, ) -> CameraResult<DeviceCapabilities>

Queries formats, resolutions, frame rates, and controls for a device.

Source

pub async fn capabilities_timeout( &self, id: &DeviceId, timeout: Duration, ) -> CameraResult<DeviceCapabilities>

Performs the capabilities_timeout operation.

Source

pub async fn open(&self, selector: DeviceSelector) -> CameraResult<Device>

Opens a selected device using the default startup deadline.

Source

pub async fn open_timeout( &self, selector: DeviceSelector, timeout: Duration, ) -> CameraResult<Device>

Performs the open_timeout operation.

Source

pub fn capture(&self, selector: DeviceSelector) -> CaptureBuilder

Creates a high-level capture builder that owns its session and receiver.

Source

pub async fn plan( &self, selector: DeviceSelector, request: CaptureRequest, ) -> CameraResult<CapturePlan>

Performs the plan operation.

Source§

impl CameraSystem

Source

pub async fn watch_devices( &self, interval: Duration, ) -> CameraResult<DeviceWatcher>

Performs the watch_devices operation.

Trait Implementations§

Source§

impl Clone for CameraSystem

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CameraSystem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CameraSystem

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.