Skip to main content

Handler

Trait Handler 

Source
pub trait Handler:
    FnOnce(KeyboardEvent<'_>) -> Option<Self::Action>
    + Copy
    + 'static {
    type Action: Copy + 'static;
}
Expand description

maps a keyboard event to an action, or lets it bubble

Required Associated Types§

Source

type Action: Copy + 'static

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<A: Copy + 'static, F> Handler for F
where F: FnOnce(KeyboardEvent<'_>) -> Option<A> + Copy + 'static,