mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 23:07:56 +01:00
Using events
This commit is contained in:
parent
053cf5498a
commit
5bd5cd57df
@ -22,6 +22,8 @@ use smol::channel::{Receiver, Sender};
|
|||||||
|
|
||||||
use futures_signals::signal::*;
|
use futures_signals::signal::*;
|
||||||
|
|
||||||
|
pub type ID = Uuid;
|
||||||
|
|
||||||
/// Status of a Machine
|
/// Status of a Machine
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||||
pub enum Status {
|
pub enum Status {
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
use futures_signals::signal::Signal;
|
use futures_signals::signal::Signal;
|
||||||
|
|
||||||
|
use crate::machine;
|
||||||
|
use crate::access;
|
||||||
|
|
||||||
struct Network {
|
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 {
|
enum Event {
|
||||||
|
/// An user wants to use a machine
|
||||||
}
|
// TODO: Define /what/ an user wants to do with said machine?
|
||||||
|
MachineRequest(machine::ID, access::UserIdentifer),
|
||||||
trait Filter<S> {
|
|
||||||
fn filter(&self, f: Fn(&S) -> bool);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user