Enum nokhwa::utils::ControlValueSetter
source · pub enum ControlValueSetter {
None,
Integer(i64),
Float(f64),
Boolean(bool),
String(String),
Bytes(Vec<u8, Global>),
KeyValue(i128, i128),
Point(f64, f64),
EnumValue(i64),
RGB(f64, f64, f64),
}
Expand description
The setter for a control value
Variants§
None
Integer(i64)
Float(f64)
Boolean(bool)
String(String)
Bytes(Vec<u8, Global>)
KeyValue(i128, i128)
Point(f64, f64)
EnumValue(i64)
RGB(f64, f64, f64)
Implementations§
source§impl ControlValueSetter
impl ControlValueSetter
pub fn as_none(&self) -> Option<()>
pub fn as_integer(&self) -> Option<&i64>
pub fn as_float(&self) -> Option<&f64>
pub fn as_boolean(&self) -> Option<&bool>
pub fn as_str(&self) -> Option<&str>
pub fn as_bytes(&self) -> Option<&[u8]>
pub fn as_key_value(&self) -> Option<(&i128, &i128)>
pub fn as_point(&self) -> Option<(&f64, &f64)>
pub fn as_enum(&self) -> Option<&i64>
pub fn as_rgb(&self) -> Option<(&f64, &f64, &f64)>
Trait Implementations§
source§impl Clone for ControlValueSetter
impl Clone for ControlValueSetter
source§fn clone(&self) -> ControlValueSetter
fn clone(&self) -> ControlValueSetter
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 ControlValueSetter
impl Debug for ControlValueSetter
source§impl<'de> Deserialize<'de> for ControlValueSetter
impl<'de> Deserialize<'de> for ControlValueSetter
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ControlValueSetter, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ControlValueSetter, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ControlValueSetter
impl Display for ControlValueSetter
source§impl PartialEq<ControlValueSetter> for ControlValueSetter
impl PartialEq<ControlValueSetter> for ControlValueSetter
source§fn eq(&self, other: &ControlValueSetter) -> bool
fn eq(&self, other: &ControlValueSetter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ControlValueSetter> for ControlValueSetter
impl PartialOrd<ControlValueSetter> for ControlValueSetter
source§fn partial_cmp(&self, other: &ControlValueSetter) -> Option<Ordering>
fn partial_cmp(&self, other: &ControlValueSetter) -> 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 ControlValueSetter
impl Serialize for ControlValueSetter
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 ControlValueSetter
Auto Trait Implementations§
impl RefUnwindSafe for ControlValueSetter
impl Send for ControlValueSetter
impl Sync for ControlValueSetter
impl Unpin for ControlValueSetter
impl UnwindSafe for ControlValueSetter
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