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>,
default: Vec<u8>,
},
KeyValuePair {
key: i128,
value: i128,
default: (i128, i128),
},
Point {
value: (f64, f64),
default: (f64, f64),
},
Enum {
value: i64,
possible: Vec<i64>,
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 duplicate 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 Display for ControlValueDescription
impl Display for ControlValueDescription
Source§impl PartialEq for ControlValueDescription
impl PartialEq for ControlValueDescription
Source§impl PartialOrd for ControlValueDescription
impl PartialOrd for ControlValueDescription
impl StructuralPartialEq for ControlValueDescription
Auto Trait Implementations§
impl Freeze for ControlValueDescription
impl RefUnwindSafe for ControlValueDescription
impl Send for ControlValueDescription
impl Sync for ControlValueDescription
impl Unpin for ControlValueDescription
impl UnsafeUnpin 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