pub enum ShortcutScope {
Global,
Scoped(WidgetId),
}Expand description
Whether a shortcut fires regardless of focus position or only when focus is inside a specific widget’s subtree.
Variants§
Global
Reachable regardless of focus. Used by app-level shortcuts.
Scoped(WidgetId)
Reachable only when focus is inside this widget (or one of its
descendants). Used by widget-declared shortcuts — the widget
that calls register_shortcut scopes to itself by default but
may scope to any WidgetId it knows (child, sibling, etc.).
Trait Implementations§
Source§impl Clone for ShortcutScope
impl Clone for ShortcutScope
Source§fn clone(&self) -> ShortcutScope
fn clone(&self) -> ShortcutScope
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 moreimpl Copy for ShortcutScope
Source§impl Debug for ShortcutScope
impl Debug for ShortcutScope
impl Eq for ShortcutScope
Source§impl PartialEq for ShortcutScope
impl PartialEq for ShortcutScope
impl StructuralPartialEq for ShortcutScope
Auto Trait Implementations§
impl Freeze for ShortcutScope
impl RefUnwindSafe for ShortcutScope
impl Send for ShortcutScope
impl Sync for ShortcutScope
impl Unpin for ShortcutScope
impl UnsafeUnpin for ShortcutScope
impl UnwindSafe for ShortcutScope
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