pub struct BindOptions {
pub scope: KeyScope,
pub typing: Typing,
pub through_modal: bool,
}Expand description
How a binding listens: its scope, whether it fires while typing, and whether a modal lets it through.
Fields§
§scope: KeyScope§typing: Typing§through_modal: boolA global binding that still fires while a modal is open (a modal otherwise blocks every global binding).
Implementations§
Source§impl BindOptions
impl BindOptions
Sourcepub fn global() -> BindOptions
pub fn global() -> BindOptions
Global, typing decided by the keys.
Sourcepub fn surface(name: &str) -> BindOptions
pub fn surface(name: &str) -> BindOptions
Only while that surface has the focus.
Sourcepub fn window(id: &str) -> BindOptions
pub fn window(id: &str) -> BindOptions
Only in that application window (KeyScope::Window).
Sourcepub fn panel(id: &str) -> BindOptions
pub fn panel(id: &str) -> BindOptions
Only while that panel is its window’s focused panel
(KeyScope::Panel).
Sourcepub fn system() -> BindOptions
pub fn system() -> BindOptions
Also while the application is not focused (KeyScope::System):
a global shortcut of the desktop.
pub fn typing(self, typing: Typing) -> BindOptions
pub fn through_modal(self) -> BindOptions
Trait Implementations§
Source§impl Clone for BindOptions
impl Clone for BindOptions
Source§fn clone(&self) -> BindOptions
fn clone(&self) -> BindOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 BindOptions
impl Debug for BindOptions
Source§impl Default for BindOptions
impl Default for BindOptions
Source§fn default() -> BindOptions
fn default() -> BindOptions
Returns the “default value” for a type. Read more
Source§impl Hash for BindOptions
impl Hash for BindOptions
Source§impl PartialEq for BindOptions
impl PartialEq for BindOptions
Source§impl Serialize for BindOptions
impl Serialize for BindOptions
impl Eq for BindOptions
impl StructuralPartialEq for BindOptions
Auto Trait Implementations§
impl Freeze for BindOptions
impl RefUnwindSafe for BindOptions
impl Send for BindOptions
impl Sync for BindOptions
impl Unpin for BindOptions
impl UnsafeUnpin for BindOptions
impl UnwindSafe for BindOptions
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