about summary refs log tree commit diff
path: root/src/modules.rs
blob: e28ac4152bc9d1c3ddbdcff29d0ff2d400ffd203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use crate::error::Result;
use crate::facilities::FacilityType;

use std::sync::{ Arc, Mutex };
use std::time::Duration;


pub use time::TimeModule;

pub mod time;


pub trait Module {
  const REQUIRED_FACILITIES: FacilityType;

  fn new() -> Result<Arc<Mutex<Self>>>;
  fn format(&mut self) -> String;
  fn sleep_duration(&self) -> Option<Duration>;
}