pub struct Shortcut { /* private fields */ }
Expand description
A keybind that can be set with either the keyboard or a mouse.
Implementations§
Source§impl Shortcut
impl Shortcut
Sourcepub fn new(
keyboard: Option<KeyboardShortcut>,
pointer: Option<PointerButton>,
) -> Self
pub fn new( keyboard: Option<KeyboardShortcut>, pointer: Option<PointerButton>, ) -> Self
Create a new Shortcut.
§Arguments
keyboard
- The keyboard shortcut to set (KeyboardShortcut), or None.pointer
- The pointer button to set (PointerButton), or None.
Sourcepub fn keyboard(&self) -> Option<KeyboardShortcut>
pub fn keyboard(&self) -> Option<KeyboardShortcut>
Keyboard shortcut, if any. This can be set along with the mouse shortcut.
Sourcepub const fn pointer(&self) -> Option<PointerButton>
pub const fn pointer(&self) -> Option<PointerButton>
Mouse button, if any. This can be set along with the keyboard shortcut.
Trait Implementations§
Source§impl Bind for Shortcut
impl Bind for Shortcut
Source§fn set(
&mut self,
keyboard: Option<KeyboardShortcut>,
pointer: Option<PointerButton>,
)
fn set( &mut self, keyboard: Option<KeyboardShortcut>, pointer: Option<PointerButton>, )
impl Copy for Shortcut
impl StructuralPartialEq for Shortcut
Auto Trait Implementations§
impl Freeze for Shortcut
impl RefUnwindSafe for Shortcut
impl Send for Shortcut
impl Sync for Shortcut
impl Unpin for Shortcut
impl UnwindSafe for Shortcut
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