diff options
Diffstat (limited to 'src/module.rs')
| -rw-r--r-- | src/module.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/module.rs b/src/module.rs new file mode 100644 index 0000000..c859bd3 --- /dev/null +++ b/src/module.rs @@ -0,0 +1,20 @@ +use crate::error::Result; +use crate::facility::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>; +} + |