pub struct CameraFormat {
pub resolution: Resolution,
pub frame_rate: FrameRate,
pub pixel_format: PixelFormat,
}Expand description
Capture format: resolution + frame rate + pixel encoding.
Fields§
§resolution: ResolutionWidth × height requested from the device.
frame_rate: FrameRateFrame rate requested from the device.
pixel_format: PixelFormatPixel encoding that frames will be delivered in.
Implementations§
Source§impl CameraFormat
impl CameraFormat
Sourcepub fn new(
resolution: Resolution,
frame_rate: FrameRate,
pixel_format: PixelFormat,
) -> Self
pub fn new( resolution: Resolution, frame_rate: FrameRate, pixel_format: PixelFormat, ) -> Self
Bundle an explicit resolution, frame rate, and pixel format.
Trait Implementations§
Source§impl Clone for CameraFormat
impl Clone for CameraFormat
Source§fn clone(&self) -> CameraFormat
fn clone(&self) -> CameraFormat
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 CameraFormat
impl Debug for CameraFormat
Source§impl<'de> Deserialize<'de> for CameraFormat
impl<'de> Deserialize<'de> for CameraFormat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CameraFormat
impl PartialEq for CameraFormat
Source§fn eq(&self, other: &CameraFormat) -> bool
fn eq(&self, other: &CameraFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CameraFormat
impl Serialize for CameraFormat
impl Copy for CameraFormat
impl Eq for CameraFormat
impl StructuralPartialEq for CameraFormat
Auto Trait Implementations§
impl Freeze for CameraFormat
impl RefUnwindSafe for CameraFormat
impl Send for CameraFormat
impl Sync for CameraFormat
impl Unpin for CameraFormat
impl UnsafeUnpin for CameraFormat
impl UnwindSafe for CameraFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.