pub trait Context: Clone + Copy {
type Event;
// Required method
fn handle_event(
&mut self,
event: Event<Self::Event>,
) -> KeyEvents<Self::Event>;
}
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", so this trait is not object safe.