Struct follow_heating::brain::boost_active_rooms::AppliedBoosts
source · pub struct AppliedBoosts {
room_temps: HashMap<String, AppliedBoost>,
leave_alone_until: HashMap<String, DateTime<Utc>>,
pub first_run: bool,
}
Expand description
Wiser radiator boosts that have been applied in order to open a valve and create demand.
Fields§
§room_temps: HashMap<String, AppliedBoost>
§leave_alone_until: HashMap<String, DateTime<Utc>>
§first_run: bool
Whether this is the first run, and hence we should take ownership of any boosts as they were probably us anyway.
Implementations§
source§impl AppliedBoosts
impl AppliedBoosts
pub fn new() -> Self
pub fn mark_applied( &mut self, room: String, temp_set: f32, end_time: DateTime<Utc> )
pub fn clear_applied(&mut self, room: &str)
pub fn get_applied_boost(&self, room_name: &str) -> Option<&AppliedBoost>
pub fn mark_leave_alone_for(&mut self, room_name: String, until: DateTime<Utc>)
pub fn can_touch(&self, room_name: &str, now: &DateTime<Utc>) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for AppliedBoosts
impl Send for AppliedBoosts
impl Sync for AppliedBoosts
impl Unpin for AppliedBoosts
impl UnwindSafe for AppliedBoosts
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