pub struct CameraControl { /* private fields */ }Expand description
This struct tells you everything about a particular KnownCameraControl.
However, you should never need to instantiate this struct, since its usually generated for you by nokhwa.
The only time you should be modifying this struct is when you need to set a value and pass it back to the camera.
NOTE: Assume the values for min and max as non-inclusive!.
E.g. if the CameraControl says min is 100, the minimum is actually 101.
Implementations§
Source§impl CameraControl
impl CameraControl
Sourcepub fn new(
control: KnownCameraControl,
name: String,
description: ControlValueDescription,
flag: Vec<KnownCameraControlFlag>,
active: bool,
) -> CameraControl
pub fn new( control: KnownCameraControl, name: String, description: ControlValueDescription, flag: Vec<KnownCameraControlFlag>, active: bool, ) -> CameraControl
Creates a new CameraControl
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Gets the name of this CameraControl
Sourcepub fn description(&self) -> &ControlValueDescription
pub fn description(&self) -> &ControlValueDescription
Gets the ControlValueDescription of this CameraControl
Sourcepub fn value(&self) -> ControlValueSetter
pub fn value(&self) -> ControlValueSetter
Gets the ControlValueSetter of the ControlValueDescription of this CameraControl
Sourcepub fn control(&self) -> KnownCameraControl
pub fn control(&self) -> KnownCameraControl
Gets the KnownCameraControl of this CameraControl
Sourcepub fn flag(&self) -> &[KnownCameraControlFlag]
pub fn flag(&self) -> &[KnownCameraControlFlag]
Gets the KnownCameraControlFlag of this CameraControl,
telling you weather this control is automatically set or manually set.
Sourcepub fn active(&self) -> bool
pub fn active(&self) -> bool
Gets active of this CameraControl,
telling you weather this control is currently active(in-use).
Sourcepub fn set_active(&mut self, active: bool)
pub fn set_active(&mut self, active: bool)
Gets active of this CameraControl,
telling you weather this control is currently active(in-use).
Trait Implementations§
Source§impl Clone for CameraControl
impl Clone for CameraControl
Source§fn clone(&self) -> CameraControl
fn clone(&self) -> CameraControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more