From ddc986ea05c5c17758e1028ce0d9f20dc133ec9d Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Wed, 18 Nov 2026 14:12:11 -0700 Subject: add an abstraction called "facilities", which does nothing yet the type system work was a pain, so it's being checked in now Force-Push: yes Change-Id: If7ec15f0108afb030fa2e5a207c77a6cf9828c43 --- src/modules.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/modules.rs') diff --git a/src/modules.rs b/src/modules.rs index 0aeda34..e28ac41 100644 --- a/src/modules.rs +++ b/src/modules.rs @@ -1,4 +1,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>>; + fn format(&mut self) -> String; + fn sleep_duration(&self) -> Option; +} + -- cgit 1.4.1