KeyBindings

Struct KeyBindings 

Source
pub struct KeyBindings {
Show 34 fields pub accept: Vec<Key>, pub change_card_status_to_active: Vec<Key>, pub change_card_status_to_completed: Vec<Key>, pub change_card_status_to_stale: Vec<Key>, pub change_card_priority_to_high: Vec<Key>, pub change_card_priority_to_medium: Vec<Key>, pub change_card_priority_to_low: Vec<Key>, pub clear_all_toasts: Vec<Key>, pub delete_board: Vec<Key>, pub delete_card: Vec<Key>, pub down: Vec<Key>, pub go_to_main_menu: Vec<Key>, pub go_to_previous_view_or_cancel: Vec<Key>, pub hide_ui_element: Vec<Key>, pub left: Vec<Key>, pub move_card_down: Vec<Key>, pub move_card_left: Vec<Key>, pub move_card_right: Vec<Key>, pub move_card_up: Vec<Key>, pub new_board: Vec<Key>, pub new_card: Vec<Key>, pub next_focus: Vec<Key>, pub open_config_menu: Vec<Key>, pub prv_focus: Vec<Key>, pub quit: Vec<Key>, pub redo: Vec<Key>, pub reset_ui: Vec<Key>, pub right: Vec<Key>, pub save_state: Vec<Key>, pub stop_user_input: Vec<Key>, pub take_user_input: Vec<Key>, pub toggle_command_palette: Vec<Key>, pub undo: Vec<Key>, pub up: Vec<Key>,
}

Fields§

§accept: Vec<Key>§change_card_status_to_active: Vec<Key>§change_card_status_to_completed: Vec<Key>§change_card_status_to_stale: Vec<Key>§change_card_priority_to_high: Vec<Key>§change_card_priority_to_medium: Vec<Key>§change_card_priority_to_low: Vec<Key>§clear_all_toasts: Vec<Key>§delete_board: Vec<Key>§delete_card: Vec<Key>§down: Vec<Key>§go_to_main_menu: Vec<Key>§go_to_previous_view_or_cancel: Vec<Key>§hide_ui_element: Vec<Key>§left: Vec<Key>§move_card_down: Vec<Key>§move_card_left: Vec<Key>§move_card_right: Vec<Key>§move_card_up: Vec<Key>§new_board: Vec<Key>§new_card: Vec<Key>§next_focus: Vec<Key>§open_config_menu: Vec<Key>§prv_focus: Vec<Key>§quit: Vec<Key>§redo: Vec<Key>§reset_ui: Vec<Key>§right: Vec<Key>§save_state: Vec<Key>§stop_user_input: Vec<Key>§take_user_input: Vec<Key>§toggle_command_palette: Vec<Key>§undo: Vec<Key>§up: Vec<Key>

Implementations§

Source§

impl KeyBindings

Source

pub fn iter(&self) -> impl Iterator<Item = (KeyBindingEnum, &Vec<Key>)>

Source

pub fn key_to_action(&self, key: &Key) -> Option<Action>

Source

pub fn keybinding_enum_to_action( &self, keybinding_enum: KeyBindingEnum, ) -> Action

Source

pub fn edit_keybinding(&mut self, key: &str, keybinding: Vec<Key>) -> &mut Self

Source

pub fn get_keybindings( &self, keybinding_enum: KeyBindingEnum, ) -> Option<Vec<Key>>

Trait Implementations§

Source§

impl Clone for KeyBindings

Source§

fn clone(&self) -> KeyBindings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KeyBindings

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for KeyBindings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for KeyBindings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for KeyBindings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,