pub trait HeatPumpControl {
// Required methods
fn try_set_heat_pump(
&mut self,
mode: HeatPumpMode
) -> Result<(), BrainFailure>;
fn try_get_heat_pump(&self) -> Result<HeatPumpMode, BrainFailure>;
fn get_heat_pump_on_with_time(
&self
) -> Result<(bool, Duration), BrainFailure>;
// Provided method
fn set_heat_pump(
&mut self,
mode: HeatPumpMode,
debug_message: Option<&'static str>
) -> Result<(), BrainFailure> { ... }
}