mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-11 01:53:23 +01:00
Writing down ideas for event networks and their handling
This commit is contained in:
parent
da5452f90f
commit
9e7b18e742
25
src/network.rs
Normal file
25
src/network.rs
Normal file
@ -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<S: Signal, F: Fn() -> ()>(&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<S: Signal, F: Fn() -> bool>(&mut self) {
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user