pub trait EventScheme {
    type Event;

    fn trigger(&self, event: Self::Event);
    fn subscribe(
        &self,
        handler: Box<dyn Fn(&Self::Event) + Sync + Send + 'static, Global>,
        once: bool
    ); }

Required Associated Types

Required Methods

Trigger the event manually and call its handler immediately.

Subscribe events, call the handler when an input event occurs. If once is ture, unsubscribe automatically after handling.

Implementors