#[non_exhaustive]pub struct Config {
pub device: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub framerate: Option<u32>,
}Expand description
Webcam capture configuration. All fields are hints; the backend picks the closest supported mode.
#[non_exhaustive]: construct via Config::default and set fields, so
new options can be added without breaking callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.device: Option<String>Platform device identifier. None opens the default camera.
- macOS (avfoundation): device index (
"0") or name ("FaceTime HD Camera"). - Linux (v4l2): a
/dev/videoNpath. - Windows (dshow): the device name (without the
video=prefix).
width: Option<u32>§height: Option<u32>§framerate: Option<u32>Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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