From 9e7b18e7421ecd397a2d7b390fbeaefb22814606 Mon Sep 17 00:00:00 2001 From: Gregor Reitzenstein Date: Tue, 15 Sep 2020 17:17:00 +0200 Subject: [PATCH] Writing down ideas for event networks and their handling --- src/network.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/network.rs diff --git a/src/network.rs b/src/network.rs new file mode 100644 index 0000000..c6340f3 --- /dev/null +++ b/src/network.rs @@ -0,0 +1,25 @@ +use futures_signals::signal::Signal; + +struct Network { + +} + +impl Network { + pub fn new() -> Self { + Self { } + } + + /// react to a signal coming in by running a future with $parameter + // TODO: Actually take a parameter. + pub fn react ()>(&mut self, s: S, f: F) { + unimplemented!() + } + + /// Filter an incoming signal + /// + /// 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 bool>(&mut self) { + unimplemented!() + } +}