pub struct ShortcutScope<C> {
pub name: &'static str,
pub shortcuts: ShortcutMap<C>,
pub consume: bool,
}Expand description
A named, optionally-consuming scope of shortcuts.
Scopes are pushed/popped by context (e.g. while an editor view is active).
When consume = true, a match in this scope stops propagation to lower scopes
and to the global map.
Fields§
§name: &'static str§shortcuts: ShortcutMap<C>§consume: boolImplementations§
Source§impl<C> ShortcutScope<C>
impl<C> ShortcutScope<C>
Sourcepub fn new(name: &'static str, shortcuts: ShortcutMap<C>, consume: bool) -> Self
pub fn new(name: &'static str, shortcuts: ShortcutMap<C>, consume: bool) -> Self
Creates a new scope with the given name, shortcut map, and consume flag.
Auto Trait Implementations§
impl<C> Freeze for ShortcutScope<C>
impl<C> RefUnwindSafe for ShortcutScope<C>where
C: RefUnwindSafe,
impl<C> Send for ShortcutScope<C>where
C: Send,
impl<C> Sync for ShortcutScope<C>where
C: Sync,
impl<C> Unpin for ShortcutScope<C>where
C: Unpin,
impl<C> UnsafeUnpin for ShortcutScope<C>
impl<C> UnwindSafe for ShortcutScope<C>where
C: UnwindSafe,
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