Struct domafic::listener::FnListener
[−]
[src]
pub struct FnListener<M, F: Fn(Event) -> M> { /* fields omitted */ }
A listener that consists of an event type and a function from Event
to message
Trait Implementations
impl<M, F: Fn(Event) -> M> Listeners<M> for FnListener<M, F>
[src]
fn process_all<'a, P: ListenerProcessor<'a, M>>(
&'a self,
acc: &mut P::Acc
) -> Result<(), P::Error>
[src]
&'a self,
acc: &mut P::Acc
) -> Result<(), P::Error>
Processes all of the listeners in the given collection using processor P
and accumulator acc
. Read more
impl<M, F: Fn(Event) -> M> Listener<M> for FnListener<M, F>
[src]
fn event_type_handled(&self) -> &'static str
[src]
Type of event handled by this Listener
. Example: "click".
fn handle_event(&self, event: Event) -> M
[src]
Handle a given event, producing a message