From 933bf0a30025cc0d2885cfd7c1eb401dd647b1d1 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Wed, 18 Nov 2026 18:26:00 -0700 Subject: it instantiates facilities now that was a bunch of type checker stuff. it sure was. Force-Push: yes Change-Id: I2f3a50529548c2d92c348190939d9bfca364f9fc --- src/module/battery.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/module/battery.rs (limited to 'src/module') diff --git a/src/module/battery.rs b/src/module/battery.rs new file mode 100644 index 0000000..05f551f --- /dev/null +++ b/src/module/battery.rs @@ -0,0 +1,30 @@ +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 + } +} + -- cgit 1.4.1