[−][src]Struct yeelight::FlowTuple
State Change used to build FlowExpresion
s
The state change can be either: color (rgb), color temperature (ct) or sleep.
Fields
duration: u64
mode: FlowMode
value: u32
brightness: i8
Implementations
impl FlowTuple
[src]
pub fn new(duration: u64, mode: FlowMode, value: u32, brightness: i8) -> Self
[src]
Create FlowTuple specifying the mode as a parameter
Arguments
duration
: duration of change in milliseconds.mode
:FlowMode
Color / CT / Sleep.value
: RGB color for color mode, CT for ct mode (ignored by sleep)brightness
: percentage (1
to100
)-1
to keep previous value (ignored by sleep)
pub fn rgb(duration: u64, rgb: u32, brightness: i8) -> Self
[src]
Create RGB FlowTuple
Arguments
duration
: duration of change in milliseconds.rgb
: color in RGB format (0x00_00_00
to0xff_ff_ff
)brightness
: percentage (1
to100
)-1
to keep previous value.
pub fn ct(duration: u64, ct: u32, brightness: i8) -> Self
[src]
Create Color Temperature FlowTuple
Arguments
duration
: duration of change in milliseconds.ct
: color temperature (1700
to6500
) K (may vary between models).brightness
: percentage (1
to100
) or-1
to keep previous value.
pub fn sleep(duration: u64) -> Self
[src]
Trait Implementations
impl Debug for FlowTuple
[src]
impl<'de> Deserialize<'de> for FlowTuple
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for FlowTuple
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl ToString for FlowTuple
[src]
Auto Trait Implementations
impl RefUnwindSafe for FlowTuple
impl Send for FlowTuple
impl Sync for FlowTuple
impl Unpin for FlowTuple
impl UnwindSafe for FlowTuple
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,