This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(dead_code)] // TODO: remove this at some point | |
use std::collections::HashMap; | |
// TODO: Does it make sense to aggregate and return the result? | |
// Lambda prototype: (id: String, message: String) -> () | |
type EventCallback<'a> = Box<dyn FnMut(String, String) + 'a>; | |
pub struct EventEngine { | |
event: HashMap<String, Vec<EventCallback<'static>>>, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
typedef struct s_main { | |
void (*f)(void); | |
} t_main; | |
typedef struct s_c1 { | |
void (*f)(void); | |
int padding; |