Struct nokhwa::CameraFormat [−][src]
pub struct CameraFormat { /* fields omitted */ }
Expand description
This is a convenience struct that holds all information about the format of a webcam stream.
It consists of a Resolution
, FrameFormat
, and a framerate(u8).
Implementations
impl CameraFormat
[src]
impl CameraFormat
[src]pub fn new(resolution: Resolution, format: FrameFormat, framerate: u32) -> Self
[src]
pub fn new(resolution: Resolution, format: FrameFormat, framerate: u32) -> Self
[src]Construct a new CameraFormat
pub fn new_from(res_x: u32, res_y: u32, format: FrameFormat, fps: u32) -> Self
[src]
pub fn new_from(res_x: u32, res_y: u32, format: FrameFormat, fps: u32) -> Self
[src]CameraFormat::new()
, but raw.
pub fn resolution(&self) -> Resolution
[src]
pub fn resolution(&self) -> Resolution
[src]Get the resolution of the current CameraFormat
pub fn width(&self) -> u32
[src]
pub fn width(&self) -> u32
[src]Get the width of the resolution of the current CameraFormat
pub fn height(&self) -> u32
[src]
pub fn height(&self) -> u32
[src]Get the height of the resolution of the current CameraFormat
pub fn set_resolution(&mut self, resolution: Resolution)
[src]
pub fn set_resolution(&mut self, resolution: Resolution)
[src]Set the CameraFormat
’s resolution.
pub fn framerate(&self) -> u32
[src]
pub fn framerate(&self) -> u32
[src]Get the framerate of the current CameraFormat
pub fn set_framerate(&mut self, framerate: u32)
[src]
pub fn set_framerate(&mut self, framerate: u32)
[src]Set the CameraFormat
’s framerate.
pub fn format(&self) -> FrameFormat
[src]
pub fn format(&self) -> FrameFormat
[src]Get the CameraFormat
’s format.
pub fn set_format(&mut self, format: FrameFormat)
[src]
pub fn set_format(&mut self, format: FrameFormat)
[src]Set the CameraFormat
’s format.
Trait Implementations
impl Clone for CameraFormat
[src]
impl Clone for CameraFormat
[src]fn clone(&self) -> CameraFormat
[src]
fn clone(&self) -> CameraFormat
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for CameraFormat
[src]
impl Debug for CameraFormat
[src]impl Default for CameraFormat
[src]
impl Default for CameraFormat
[src]impl Display for CameraFormat
[src]
impl Display for CameraFormat
[src]impl Hash for CameraFormat
[src]
impl Hash for CameraFormat
[src]impl PartialEq<CameraFormat> for CameraFormat
[src]
impl PartialEq<CameraFormat> for CameraFormat
[src]fn eq(&self, other: &CameraFormat) -> bool
[src]
fn eq(&self, other: &CameraFormat) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &CameraFormat) -> bool
[src]
fn ne(&self, other: &CameraFormat) -> bool
[src]This method tests for !=
.
impl Copy for CameraFormat
[src]
impl StructuralPartialEq for CameraFormat
[src]
Auto Trait Implementations
impl RefUnwindSafe for CameraFormat
impl Send for CameraFormat
impl Sync for CameraFormat
impl Unpin for CameraFormat
impl UnwindSafe for CameraFormat
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more