diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-11-25 03:24:45 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-11-25 03:24:45 -0700 |
| commit | 5ec7ae026ce9d8c48ef5f0590a300fa308efa487 (patch) | |
| tree | b0f5b2e19d724a548ee36ad636d114666d201318 /src/module.rs | |
| parent | 6ab1eb29d593af69aef18ddcfadd171c07aac2ed (diff) | |
i3 mode module does the subscription now
Force-Push: yes Change-Id: I2996d58c4eb605caa904f23f876853fc3eb9761d
Diffstat (limited to 'src/module.rs')
| -rw-r--r-- | src/module.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/module.rs b/src/module.rs index 6d2822c..a716fa7 100644 --- a/src/module.rs +++ b/src/module.rs @@ -3,6 +3,8 @@ use crate::facility::{ FacilityMap, FacilityType }; use std::time::Duration; +use async_executor::StaticExecutor; + pub use battery::BatteryModule; pub use i3_mode::I3ModeModule; @@ -19,7 +21,8 @@ pub mod time; pub trait CreatableModule: Module + Sized { const REQUIRED_FACILITIES: FacilityType; - fn new(facilities: &mut FacilityMap) -> Result<Self>; + async fn new(facilities: &mut FacilityMap, executor: &'static StaticExecutor) + -> Result<Self>; /* The only way to coerce to dyn is to return as it! */ fn as_box<'a>(self) -> Box<dyn Module + 'a> |