Adds an event network draft

This commit is contained in:
Gregor Reitzenstein 2020-09-17 09:01:00 +02:00
parent 67c5b4a927
commit f53b4eac8e
2 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,7 @@ mod error;
mod machine;
mod connection;
mod registries;
mod network;
use signal_hook::iterator::Signals;

View File

@ -19,7 +19,15 @@ impl Network {
///
/// Idea being that bffh builds an event network that filters an incoming event into an
/// the appropiate (sub)set of signal handlers based on pretty dynamic configuration.
pub fn filter<S: Signal, F: Fn() -> bool>(&mut self) {
pub fn filter<B, S: Signal<Item=B>, F: Fn(&B) -> bool>(&mut self, ) {
unimplemented!()
}
}
enum Event {
}
trait Filter<S> {
fn filter(&self, f: Fn(&S) -> bool);
}