#[non_exhaustive]pub struct KeyBindings<CustomKeybinding: CustomKeybinding, CustomEvent: CustomEvent> {Show 15 fields
pub redo: Vec<Event<CustomEvent>>,
pub undo: Vec<Event<CustomEvent>>,
pub scroll_down: Vec<Event<CustomEvent>>,
pub scroll_end: Vec<Event<CustomEvent>>,
pub scroll_home: Vec<Event<CustomEvent>>,
pub scroll_left: Vec<Event<CustomEvent>>,
pub scroll_right: Vec<Event<CustomEvent>>,
pub scroll_up: Vec<Event<CustomEvent>>,
pub scroll_step_down: Vec<Event<CustomEvent>>,
pub scroll_step_up: Vec<Event<CustomEvent>>,
pub help: Vec<Event<CustomEvent>>,
pub search_start: Vec<Event<CustomEvent>>,
pub search_next: Vec<Event<CustomEvent>>,
pub search_previous: Vec<Event<CustomEvent>>,
pub custom: CustomKeybinding,
}Expand description
Represents a mapping between an input event and an action.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.redo: Vec<Event<CustomEvent>>Key bindings for redoing a change.
undo: Vec<Event<CustomEvent>>Key bindings for undoing a change.
scroll_down: Vec<Event<CustomEvent>>Key bindings for scrolling down.
scroll_end: Vec<Event<CustomEvent>>Key bindings for scrolling to the end.
scroll_home: Vec<Event<CustomEvent>>Key bindings for scrolling to the start.
scroll_left: Vec<Event<CustomEvent>>Key bindings for scrolling to the left.
scroll_right: Vec<Event<CustomEvent>>Key bindings for scrolling to the right.
scroll_up: Vec<Event<CustomEvent>>Key bindings for scrolling up.
scroll_step_down: Vec<Event<CustomEvent>>Key bindings for scrolling down a step.
scroll_step_up: Vec<Event<CustomEvent>>Key bindings for scrolling up a step.
help: Vec<Event<CustomEvent>>Key bindings for help.
search_start: Vec<Event<CustomEvent>>Key bindings for starting search.
search_next: Vec<Event<CustomEvent>>Key bindings for next search match.
search_previous: Vec<Event<CustomEvent>>Key bindings for previous search match.
custom: CustomKeybindingCustom keybindings
Implementations§
Source§impl<CustomKeybinding: CustomKeybinding, CustomEvent: CustomEvent> KeyBindings<CustomKeybinding, CustomEvent>
impl<CustomKeybinding: CustomKeybinding, CustomEvent: CustomEvent> KeyBindings<CustomKeybinding, CustomEvent>
Sourcepub fn new(key_bindings: &KeyBindings) -> Self
pub fn new(key_bindings: &KeyBindings) -> Self
Create a new instance from the configuration keybindings.
Trait Implementations§
Source§impl<CustomKeybinding: Debug + CustomKeybinding, CustomEvent: Debug + CustomEvent> Debug for KeyBindings<CustomKeybinding, CustomEvent>
impl<CustomKeybinding: Debug + CustomKeybinding, CustomEvent: Debug + CustomEvent> Debug for KeyBindings<CustomKeybinding, CustomEvent>
Auto Trait Implementations§
impl<CustomKeybinding, CustomEvent> Freeze for KeyBindings<CustomKeybinding, CustomEvent>where
CustomKeybinding: Freeze,
impl<CustomKeybinding, CustomEvent> RefUnwindSafe for KeyBindings<CustomKeybinding, CustomEvent>where
CustomKeybinding: RefUnwindSafe,
CustomEvent: RefUnwindSafe,
impl<CustomKeybinding, CustomEvent> Send for KeyBindings<CustomKeybinding, CustomEvent>
impl<CustomKeybinding, CustomEvent> Sync for KeyBindings<CustomKeybinding, CustomEvent>
impl<CustomKeybinding, CustomEvent> Unpin for KeyBindings<CustomKeybinding, CustomEvent>
impl<CustomKeybinding, CustomEvent> UnwindSafe for KeyBindings<CustomKeybinding, CustomEvent>where
CustomKeybinding: UnwindSafe,
CustomEvent: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more