pub struct KeyBinding {
pub code: KeyCode,
pub modifiers: KeyModifiers,
}Fields§
§code: KeyCode§modifiers: KeyModifiersImplementations§
Source§impl KeyBinding
impl KeyBinding
pub fn new(code: KeyCode) -> Self
pub fn ctrl(code: KeyCode) -> Self
pub fn alt(code: KeyCode) -> Self
pub fn shift(code: KeyCode) -> Self
pub fn with_modifiers(code: KeyCode, modifiers: KeyModifiers) -> Self
pub fn matches(&self, event: &KeyEvent) -> bool
pub fn display(&self) -> String
Trait Implementations§
Source§impl Clone for KeyBinding
impl Clone for KeyBinding
Source§fn clone(&self) -> KeyBinding
fn clone(&self) -> KeyBinding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyBinding
impl Debug for KeyBinding
impl Eq for KeyBinding
Source§impl From<&KeyEvent> for KeyBinding
impl From<&KeyEvent> for KeyBinding
Source§impl Hash for KeyBinding
impl Hash for KeyBinding
Source§impl PartialEq for KeyBinding
impl PartialEq for KeyBinding
impl StructuralPartialEq for KeyBinding
Auto Trait Implementations§
impl Freeze for KeyBinding
impl RefUnwindSafe for KeyBinding
impl Send for KeyBinding
impl Sync for KeyBinding
impl Unpin for KeyBinding
impl UnsafeUnpin for KeyBinding
impl UnwindSafe for KeyBinding
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