[][src]Struct huelib::resource::sensor::State

pub struct State {
    pub presence: Option<bool>,
    pub flag: Option<bool>,
    pub last_updated: Option<NaiveDateTime>,
    pub button_event: Option<u32>,
    pub temperature: Option<u32>,
    pub light_level: Option<u32>,
    pub dark: Option<bool>,
    pub daylight: Option<bool>,
}

Current state of a sensor.

Fields

presence: Option<bool>

Whether the sensor is present.

flag: Option<bool>

Flag of the sensor.

last_updated: Option<NaiveDateTime>

The current battery state in percent.

button_event: Option<u32>

Button id that was pressed last.

temperature: Option<u32>

The temperature in centigrades.

light_level: Option<u32>

The light level in centiluxes.

dark: Option<bool>

Whether it's dark according to the sensor's sensitivity.

daylight: Option<bool>

Whether it's daytime according to the sensor's sensitivity.

Trait Implementations

impl Clone for State[src]

impl Copy for State[src]

impl Debug for State[src]

impl<'de> Deserialize<'de> for State[src]

impl Eq for State[src]

impl PartialEq<State> for State[src]

impl StructuralEq for State[src]

impl StructuralPartialEq for State[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.