pub trait Hook {
// Required methods
fn should_intercept(&self, kind: EventKind) -> bool;
fn intercept_event(&mut self, event: Event);
}Required Methods§
fn should_intercept(&self, kind: EventKind) -> bool
Sourcefn intercept_event(&mut self, event: Event)
fn intercept_event(&mut self, event: Event)
Hooks must not block the event stream; this method should be a cheap synchronous call. Delegate heavy work to another thread or spawn async tasks internally.