Struct gpui2::KeyBinding
source · pub struct KeyBinding { /* private fields */ }
Implementations§
source§impl KeyBinding
impl KeyBinding
pub fn new<A: Action>( keystrokes: &str, action: A, context_predicate: Option<&str> ) -> Self
pub fn load( keystrokes: &str, action: Box<dyn Action>, context: Option<&str> ) -> Result<Self>
pub fn matches_context(&self, contexts: &[KeyContext]) -> bool
pub fn match_keystrokes( &self, pending_keystrokes: &[Keystroke], contexts: &[KeyContext] ) -> KeyMatch
pub fn keystrokes_for_action( &self, action: &dyn Action, contexts: &[KeyContext] ) -> Option<SmallVec<[Keystroke; 2]>>
pub fn keystrokes(&self) -> &[Keystroke]
pub fn action(&self) -> &dyn Action
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for KeyBinding
impl !Send for KeyBinding
impl !Sync for KeyBinding
impl Unpin 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