Listener

Trait Listener 

Source
pub trait Listener<Ev: Debug>:
    Fn(&Ev)
    + Send
    + 'static { }
Expand description

A Listener is a user-defined closure that is generic over its received event Ev. The closure handles the event and may act upon an event.

Trait Implementations§

Source§

impl<Ev> Debug for dyn Listener<Ev>
where Ev: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

Source§

impl<Ev, F> Listener<Ev> for F
where F: Fn(&Ev) + Send + 'static, Ev: Debug,