Enum nokhwa::utils::ControlValueDescription
source · pub enum ControlValueDescription {
None,
Integer {
value: i64,
default: i64,
step: i64,
},
IntegerRange {
min: i64,
max: i64,
value: i64,
step: i64,
default: i64,
},
Float {
value: f64,
default: f64,
step: f64,
},
FloatRange {
min: f64,
max: f64,
value: f64,
step: f64,
default: f64,
},
Boolean {
value: bool,
default: bool,
},
String {
value: String,
default: Option<String>,
},
Bytes {
value: Vec<u8, Global>,
default: Vec<u8, Global>,
},
KeyValuePair {
key: i128,
value: i128,
default: (i128, i128),
},
Point {
value: (f64, f64),
default: (f64, f64),
},
Enum {
value: i64,
possible: Vec<i64, Global>,
default: i64,
},
RGB {
value: (f64, f64, f64),
max: (f64, f64, f64),
default: (f64, f64, f64),
},
}
Expand description
The values for a CameraControl
.
This provides a wide range of values that can be used to control a camera.
Variants§
Implementations§
source§impl ControlValueDescription
impl ControlValueDescription
sourcepub fn value(&self) -> ControlValueSetter
pub fn value(&self) -> ControlValueSetter
Get the value of this ControlValueDescription
sourcepub fn verify_setter(&self, setter: &ControlValueSetter) -> bool
pub fn verify_setter(&self, setter: &ControlValueSetter) -> bool
Verifies if the setter is valid for the provided ControlValueDescription
.
true
=> Is valid.false
=> Is not valid.
If the step is 0, it will automatically return true
.
Trait Implementations§
source§impl Clone for ControlValueDescription
impl Clone for ControlValueDescription
source§fn clone(&self) -> ControlValueDescription
fn clone(&self) -> ControlValueDescription
Returns a copy of the value. Read more
1.0.0 · 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 ControlValueDescription
impl Debug for ControlValueDescription
source§impl<'de> Deserialize<'de> for ControlValueDescription
impl<'de> Deserialize<'de> for ControlValueDescription
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ControlValueDescription, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ControlValueDescription, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ControlValueDescription
impl Display for ControlValueDescription
source§impl PartialEq<ControlValueDescription> for ControlValueDescription
impl PartialEq<ControlValueDescription> for ControlValueDescription
source§fn eq(&self, other: &ControlValueDescription) -> bool
fn eq(&self, other: &ControlValueDescription) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ControlValueDescription> for ControlValueDescription
impl PartialOrd<ControlValueDescription> for ControlValueDescription
source§fn partial_cmp(&self, other: &ControlValueDescription) -> Option<Ordering>
fn partial_cmp(&self, other: &ControlValueDescription) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ControlValueDescription
impl Serialize for ControlValueDescription
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ControlValueDescription
Auto Trait Implementations§
impl RefUnwindSafe for ControlValueDescription
impl Send for ControlValueDescription
impl Sync for ControlValueDescription
impl Unpin for ControlValueDescription
impl UnwindSafe for ControlValueDescription
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