removed event module
might find fitting library latter
This commit is contained in:
parent
3c9f92a1ab
commit
5235ca9308
2 changed files with 0 additions and 32 deletions
|
@ -1,31 +0,0 @@
|
|||
///
|
||||
|
||||
|
||||
trait Eventable {
|
||||
key() ->
|
||||
}
|
||||
|
||||
struct EventManager<Events> {}
|
||||
|
||||
impl<Events> EventManager<Events> {
|
||||
fn new() -> Self {
|
||||
EventManager {}
|
||||
}
|
||||
|
||||
fn on(&mut self, event: E, callback: dyn Fn(E)) {
|
||||
//
|
||||
}
|
||||
|
||||
fn send(&self, event: E) {}
|
||||
}
|
||||
|
||||
fn test() {
|
||||
enum Events {
|
||||
A,
|
||||
B(i32),
|
||||
C(f64),
|
||||
}
|
||||
|
||||
let event_manager = EventManager::new::<Events>();
|
||||
event_manager.on(Events::A, || {})
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
pub mod config;
|
||||
pub mod database;
|
||||
pub mod event;
|
||||
pub mod harsh;
|
||||
pub mod http;
|
||||
pub mod log;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue