Skip to main content

InputInterceptor

Trait InputInterceptor 

Source
pub trait InputInterceptor<Cx: ?Sized> {
    // Required method
    fn intercept(&mut self, ev: &ValidatedEvent<'_>, cx: &mut Cx) -> Disposition;

    // Provided method
    fn is_active(&self) -> bool { ... }
}
Expand description

Pre-dispatch hook (X1). cx is the host’s context: the facts only the host knows (Web: DOM target facts; Skia shell: the session it acts on).

Required Methods§

Source

fn intercept(&mut self, ev: &ValidatedEvent<'_>, cx: &mut Cx) -> Disposition

Provided Methods§

Source

fn is_active(&self) -> bool

Whether this interceptor currently has active rules/work requiring the host to keep input listeners attached. Defaults to true.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§