pub struct Accelerator { /* private fields */ }Expand description
A keyboard shortcut that consists of an optional combination
of modifier keys (provided by Modifiers and
one key (Code).
§Warning
This struct cannot represent all shortcuts found on non-U.S. keyboard layouts and might
be deprecated in the future.
Please use KeyAccelerator instead.
Implementations§
Source§impl Accelerator
impl Accelerator
Sourcepub fn new(mods: Option<Modifiers>, key: Code) -> Self
pub fn new(mods: Option<Modifiers>, key: Code) -> Self
Creates a new accelerator to define keyboard shortcuts throughout your application.
Only Modifiers::ALT, Modifiers::SHIFT, Modifiers::CONTROL, and Modifiers::SUPER
Trait Implementations§
Source§impl Clone for Accelerator
impl Clone for Accelerator
Source§fn clone(&self) -> Accelerator
fn clone(&self) -> Accelerator
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 Accelerator
Source§impl Debug for Accelerator
impl Debug for Accelerator
impl Eq for Accelerator
Source§impl From<Accelerator> for KeyAccelerator
impl From<Accelerator> for KeyAccelerator
Source§fn from(accel: Accelerator) -> Self
fn from(accel: Accelerator) -> Self
Converts to this type from the input type.
Source§impl FromStr for Accelerator
impl FromStr for Accelerator
Source§impl Hash for Accelerator
impl Hash for Accelerator
Source§impl PartialEq for Accelerator
impl PartialEq for Accelerator
Source§fn eq(&self, other: &Accelerator) -> bool
fn eq(&self, other: &Accelerator) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Accelerator
Source§impl TryFrom<&str> for Accelerator
impl TryFrom<&str> for Accelerator
Auto Trait Implementations§
impl Freeze for Accelerator
impl RefUnwindSafe for Accelerator
impl Send for Accelerator
impl Sync for Accelerator
impl Unpin for Accelerator
impl UnsafeUnpin for Accelerator
impl UnwindSafe for Accelerator
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