pub trait Context: Clone + Copy {
type Event;
// Required methods
fn handle_event(
&mut self,
event: Event<Self::Event>,
) -> KeyEvents<Self::Event>;
fn reset(&mut self);
}Expand description
Used to provide state that may affect behaviour when pressing the key.
e.g. the behaviour of layered::LayeredKey depends on which layers are active in layered::Context.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".