[−][src]Trait xidlehook_core::modules::Module
A generic module that controls whether timers should execute or not (outside of the normal timer)
Provided methods
fn pre_timer(&mut self, _timer: TimerInfo) -> Result<Progress>
Decides if a timer should be allowed to execute
fn post_timer(&mut self, _timer: TimerInfo) -> Result<Progress>
Decides what happens after a timer has executed
fn warning(&mut self, _error: &Error) -> Result<()>
Is called when there's a potentially recoverable error. Can re-throw an unrecoverable error.
fn reset(&mut self) -> Result<()>
If this is called, the counting was reset - clear any cache here
Implementations on Foreign Types
impl Module for ()
[src]
The default module is also the unit type because why not
impl Module for Box<dyn Module>
[src]
fn pre_timer(&mut self, timer: TimerInfo) -> Result<Progress>
[src]
fn post_timer(&mut self, timer: TimerInfo) -> Result<Progress>
[src]
fn warning(&mut self, error: &Error) -> Result<()>
[src]
fn reset(&mut self) -> Result<()>
[src]
impl<A, B> Module for (A, B) where
A: Module,
B: Module,
[src]
A: Module,
B: Module,
Combine two timers using the type-system. Can be recursed for a fixed-size amount of timers. Similar to iterator.chain.
fn pre_timer(&mut self, timer: TimerInfo) -> Result<Progress>
[src]
fn post_timer(&mut self, timer: TimerInfo) -> Result<Progress>
[src]
fn warning(&mut self, error: &Error) -> Result<()>
[src]
fn reset(&mut self) -> Result<()>
[src]
impl<M: Module> Module for Vec<M>
[src]
Combine multiple modules with a dynamic size