#[non_exhaustive]pub enum State {
TargetTemperature(f32),
Mode(Mode),
Name(String),
Status(String),
Boost(Option<bool>),
FrostProtection(u32),
OptimumStart(bool),
AutoBoost(String),
AutoBoostTarget(u32),
Schedule(HashMap<String, Value>),
}Expand description
The state of a particular facet of a Hive product.
Not all products will have all states - for example ProductData::HotWater will not have
State::TargetTemperature
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TargetTemperature(f32)
The target temperature of the Hive product.
Mode(Mode)
The mode of the Hive product.
Name(String)
The name of the Hive product.
Status(String)
The status of the Hive product.
Boost(Option<bool>)
Whether the Hive product is currently boosted or not.
FrostProtection(u32)
The temperature of the Frost Protection mode.
OptimumStart(bool)
Whether the Hive product will choose an Optimum Start time or not when in scheduled mode.
AutoBoost(String)
Whether the Hive product is currently in Auto Boost mode or not.
AutoBoostTarget(u32)
The target temperature of the Auto Boost mode.
Schedule(HashMap<String, Value>)
The schedule for the Hive product, when it is in Mode::Schedule.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.