roopes_core/aggregates/executable_observer/
mod.rs1#[cfg(test)]
3mod tests;
4
5use crate::prelude::*;
6
7pub struct ExecutableObserver<O>
10where
11 O: Observer,
12{
13 delegate: O,
14}
15
16impl<O> Observer for ExecutableObserver<O>
17where
18 O: Observer,
19{
20 fn notify(&self)
21 {
22 self.delegate.notify();
23 }
24}
25
26impl<O> Executable for ExecutableObserver<O>
27where
28 O: Observer,
29{
30 fn execute(&self)
31 {
32 self.delegate.notify();
33 }
34}
35
36pub mod prelude
39{
40 pub use super::ExecutableObserver;
41}