pub enum ScheduleMode {
Comfort,
Eco,
Off,
}Expand description
Interpretation of a single character slot in a device’s weekly schedule string.
Each day’s schedule is a 24-character string; each character represents one hour and maps to one of these modes.
Variants§
Comfort
'C' — heat to the comfort preset temperature.
Eco
'E' — heat to the eco preset temperature.
Off
Any other character — device is off during this hour.
Implementations§
Source§impl ScheduleMode
impl ScheduleMode
Sourcepub fn from_char(c: char) -> Self
pub fn from_char(c: char) -> Self
Parse a schedule character into the corresponding ScheduleMode.
'C'→ScheduleMode::Comfort'E'→ScheduleMode::Eco- anything else →
ScheduleMode::Off
Trait Implementations§
Source§impl Clone for ScheduleMode
impl Clone for ScheduleMode
Source§fn clone(&self) -> ScheduleMode
fn clone(&self) -> ScheduleMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScheduleMode
impl Debug for ScheduleMode
Source§impl PartialEq for ScheduleMode
impl PartialEq for ScheduleMode
impl StructuralPartialEq for ScheduleMode
Auto Trait Implementations§
impl Freeze for ScheduleMode
impl RefUnwindSafe for ScheduleMode
impl Send for ScheduleMode
impl Sync for ScheduleMode
impl Unpin for ScheduleMode
impl UnsafeUnpin for ScheduleMode
impl UnwindSafe for ScheduleMode
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