diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-11-18 18:26:00 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-11-18 18:26:00 -0700 |
| commit | 933bf0a30025cc0d2885cfd7c1eb401dd647b1d1 (patch) | |
| tree | b65f2efc46bf96b82527039687c4706b801ff508 /src/module/battery.rs | |
| parent | dcf0c6ce5ce21647640b2b35715ede50a5a97881 (diff) | |
it instantiates facilities now
that was a bunch of type checker stuff. it sure was. Force-Push: yes Change-Id: I2f3a50529548c2d92c348190939d9bfca364f9fc
Diffstat (limited to 'src/module/battery.rs')
| -rw-r--r-- | src/module/battery.rs | 30 |
1 files changed, 30 insertions, 0 deletions
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<BatteryModule> { + Ok(BatteryModule { + }) + } +} + +impl Module for BatteryModule { + fn format(&mut self) -> String { + "battery".to_string() + } + + fn sleep_duration(&self) -> Option<Duration> { + None + } +} + |