Function bifrost::event [−][src]
pub fn event<Context, F>(handler: F) -> GenericEvent<Context, F> where
F: Fn(&Relay<Context>, &mut Context),
Context: Send,
An helper function to create an event from a function or a closure
Example
let my_event = event( |relay, context| println!("Do something here") );