#[repr(C)]pub struct CameraConfig {
pub facing: CameraFacing,
pub width: u32,
pub height: u32,
pub fps: u32,
pub output_format: RawImageFormat,
}Expand description
Requested capture configuration - the input to start_camera. Zero
width/height/fps mean “let the backend pick its default”.
Fields§
§facing: CameraFacingWhich camera to open.
width: u32Preferred frame width in px (0 = backend default).
height: u32Preferred frame height in px (0 = backend default).
fps: u32Preferred frame rate (0 = backend default).
output_format: RawImageFormatTexture format the backend should deliver. BGRA8 is the portable
default; Nv12 (a later RawImageFormat addition) is the zero-copy
path on platforms that produce it natively.
Implementations§
Source§impl CameraConfig
impl CameraConfig
Sourcepub fn new(facing: CameraFacing) -> Self
pub fn new(facing: CameraFacing) -> Self
A default config for the given facing (backend-chosen size/fps,
BGRA8).
Trait Implementations§
Source§impl Clone for CameraConfig
impl Clone for CameraConfig
Source§fn clone(&self) -> CameraConfig
fn clone(&self) -> CameraConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CameraConfig
impl Debug for CameraConfig
Source§impl Default for CameraConfig
impl Default for CameraConfig
Source§impl PartialEq for CameraConfig
impl PartialEq for CameraConfig
Source§fn eq(&self, other: &CameraConfig) -> bool
fn eq(&self, other: &CameraConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CameraConfig
impl StructuralPartialEq for CameraConfig
Auto Trait Implementations§
impl Freeze for CameraConfig
impl RefUnwindSafe for CameraConfig
impl Send for CameraConfig
impl Sync for CameraConfig
impl Unpin for CameraConfig
impl UnsafeUnpin for CameraConfig
impl UnwindSafe for CameraConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more