blob: 05f551fa76a7a12c6d57a927ff467dc9b9ead9af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
}
}
|