Struct nokhwa::utils::CameraControl
source · 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, Global>,
active: bool
) -> CameraControl
pub fn new( control: KnownCameraControl, name: String, description: ControlValueDescription, flag: Vec<KnownCameraControlFlag, Global>, 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 moresource§impl Debug for CameraControl
impl Debug for CameraControl
source§impl<'de> Deserialize<'de> for CameraControl
impl<'de> Deserialize<'de> for CameraControl
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<CameraControl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<CameraControl, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl Display for CameraControl
impl Display for CameraControl
source§impl PartialEq<CameraControl> for CameraControl
impl PartialEq<CameraControl> for CameraControl
source§fn eq(&self, other: &CameraControl) -> bool
fn eq(&self, other: &CameraControl) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<CameraControl> for CameraControl
impl PartialOrd<CameraControl> for CameraControl
source§fn partial_cmp(&self, other: &CameraControl) -> Option<Ordering>
fn partial_cmp(&self, other: &CameraControl) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more