use crate::error::Result; use crate::facility::FacilityType; use crate::module::{ CreatableModule, Module }; use std::time::Duration; pub struct BatteryModule { } impl CreatableModule for BatteryModule { const REQUIRED_FACILITIES: FacilityType = FacilityType::ENVSYS; fn new() -> Result { Ok(BatteryModule { }) } } impl Module for BatteryModule { fn format(&mut self) -> String { "battery".to_string() } fn sleep_duration(&self) -> Option { None } }