Using events

This commit is contained in:
Gregor Reitzenstein 2020-09-17 10:18:02 +02:00
parent 053cf5498a
commit 5bd5cd57df
2 changed files with 12 additions and 5 deletions

View File

@ -22,6 +22,8 @@ use smol::channel::{Receiver, Sender};
use futures_signals::signal::*;
pub type ID = Uuid;
/// Status of a Machine
#[derive(Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
pub enum Status {

View File

@ -1,5 +1,8 @@
use futures_signals::signal::Signal;
use crate::machine;
use crate::access;
struct Network {
}
@ -24,10 +27,12 @@ impl Network {
}
}
/// The internal bffh event type
///
/// Everything that BFFH considers an event is contained in an instance of this.
#[derive(PartialEq, Eq, Clone, PartialOrd, Ord, Debug)]
enum Event {
}
trait Filter<S> {
fn filter(&self, f: Fn(&S) -> bool);
/// An user wants to use a machine
// TODO: Define /what/ an user wants to do with said machine?
MachineRequest(machine::ID, access::UserIdentifer),
}