Function domafic::listener::on [] [src]

pub fn on<M, F: Fn(Event) -> M>(event_type: &'static str,
                                f: F)
                                -> FnListener<M, F>

Create an FnListener that handles to events of type event_type using function f