pub struct KeybindRegistry { /* private fields */ }Expand description
Registry for storing and looking up keybinds
Implementations§
Source§impl KeybindRegistry
impl KeybindRegistry
Sourcepub fn lookup_by_action(&self, action_id: &str) -> Option<&Keybind>
pub fn lookup_by_action(&self, action_id: &str) -> Option<&Keybind>
Lookup keybind by action ID
Sourcepub fn lookup_by_key(&self, key: &KeyCombo) -> Option<&str>
pub fn lookup_by_key(&self, key: &KeyCombo) -> Option<&str>
Lookup action ID by key combination
Sourcepub fn all_keybinds(&self) -> Vec<&Keybind>
pub fn all_keybinds(&self) -> Vec<&Keybind>
Get all keybinds
Sourcepub fn keybinds_by_category(&self, category: &str) -> Vec<&Keybind>
pub fn keybinds_by_category(&self, category: &str) -> Vec<&Keybind>
Get all keybinds for a category
Sourcepub fn categories(&self) -> Vec<String>
pub fn categories(&self) -> Vec<String>
Get all unique categories
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeybindRegistry
impl RefUnwindSafe for KeybindRegistry
impl Send for KeybindRegistry
impl Sync for KeybindRegistry
impl Unpin for KeybindRegistry
impl UnwindSafe for KeybindRegistry
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