Struct input::KeyBindings

source ·
#[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: CustomKeybinding

Custom keybindings

Implementations§

source§

impl<CustomKeybinding: CustomKeybinding, CustomEvent: CustomEvent> KeyBindings<CustomKeybinding, CustomEvent>

source

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>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<CustomKeybinding, CustomEvent> RefUnwindSafe for KeyBindings<CustomKeybinding, CustomEvent>where CustomEvent: RefUnwindSafe, CustomKeybinding: RefUnwindSafe,

§

impl<CustomKeybinding, CustomEvent> Send for KeyBindings<CustomKeybinding, CustomEvent>where CustomEvent: Send, CustomKeybinding: Send,

§

impl<CustomKeybinding, CustomEvent> Sync for KeyBindings<CustomKeybinding, CustomEvent>where CustomEvent: Sync, CustomKeybinding: Sync,

§

impl<CustomKeybinding, CustomEvent> Unpin for KeyBindings<CustomKeybinding, CustomEvent>where CustomEvent: Unpin, CustomKeybinding: Unpin,

§

impl<CustomKeybinding, CustomEvent> UnwindSafe for KeyBindings<CustomKeybinding, CustomEvent>where CustomEvent: UnwindSafe, CustomKeybinding: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.