pub enum Convert {
Scale(f64, u32),
Lux,
OnOff,
Bit(u8),
Raw,
}Expand description
How a raw attribute becomes a JSON value.
Variants§
Scale(f64, u32)
Multiply, rounding to decimals.
Lux
Illuminance: lux = 10 ^ ((value - 1) / 10000).
OnOff
“ON” / “OFF”.
Bit(u8)
One bit of a bitmap as a boolean.
Raw
The value as is.
Trait Implementations§
impl Copy for Convert
impl StructuralPartialEq for Convert
Auto Trait Implementations§
impl Freeze for Convert
impl RefUnwindSafe for Convert
impl Send for Convert
impl Sync for Convert
impl Unpin for Convert
impl UnsafeUnpin for Convert
impl UnwindSafe for Convert
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