Struct thermostat::Thermostat[][src]

pub struct Thermostat<'a> { /* fields omitted */ }

Thermostat state machine

Methods

impl<'a> Thermostat<'a>
[src]

Create a new thermostat using the provided interface

Change the current operating mode.

Will return an Err result if the specified operating mode is incompatible with the current configuration.

Get the current operating mode.

Change the minimum safe temperature.

If the maximum set temperature is higher than the specified maximum safe temperature, the maximum set temperature will be automatically adjusted to match.

An Err Result is returned if the specified temperature is not within the bounds of the minimum and maximum safe temperatures.

Get the current maximum safe temperature.

Change the minimum safe temperature.

If the minimum set temperature is lower than the specified minimum safe temperature, the minimum set temperature will be automatically adjusted to match.

An Err Result is returned if the specified temperature is not within the bounds of the minimum and maximum safe temperatures.

Get the current minimum safe temperature

Change the maximum set temperature.

If the minimum set temperature is higher than the specified maximum set temperature, the minimum set temperature will be automatically adjusted to match.

An Err Result is returned if the specified temperature is not within the bounds of the minimum and maximum safe temperatures.

Get the current maximum set temperature.

Change the minimum set temperature.

If the minimum set temperature is higher than the specified maximum set temperature, the maximum set temperature will be automatically adjusted to match.

An Err Result is returned if the specified temperature is not within the bounds of the minimum and maximum safe temperatures.

Get the current minimum set temperature.

Get the current temperature as known to the thermostat

Update the thermostat with a new temperature reading

Trait Implementations

impl<'a> Copy for Thermostat<'a>
[src]

impl<'a> Clone for Thermostat<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a> !Send for Thermostat<'a>

impl<'a> !Sync for Thermostat<'a>