Struct wry::application::accelerator::AcceleratorId
source · [−]pub struct AcceleratorId(pub u16);
Expand description
Identifier of an Accelerator.
Whenever you receive an event arising from a GlobalShortcutEvent, MenuEvent
or KeyboardInput , this event contains a AcceleratorId
which identifies its origin.
Tuple Fields
0: u16
Implementations
sourceimpl AcceleratorId
impl AcceleratorId
sourcepub const EMPTY: AcceleratorId
pub const EMPTY: AcceleratorId
Return an empty AcceleratorId
.
sourcepub fn new(accelerator_string: &str) -> AcceleratorId
pub fn new(accelerator_string: &str) -> AcceleratorId
Create new AcceleratorId
from a String.
Trait Implementations
sourceimpl Clone for AcceleratorId
impl Clone for AcceleratorId
sourcepub fn clone(&self) -> AcceleratorId
pub fn clone(&self) -> AcceleratorId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AcceleratorId
impl Debug for AcceleratorId
sourceimpl From<AcceleratorId> for u32
impl From<AcceleratorId> for u32
sourcepub fn from(s: AcceleratorId) -> u32
pub fn from(s: AcceleratorId) -> u32
Performs the conversion.
sourceimpl Hash for AcceleratorId
impl Hash for AcceleratorId
sourceimpl PartialEq<AcceleratorId> for AcceleratorId
impl PartialEq<AcceleratorId> for AcceleratorId
sourcepub fn eq(&self, other: &AcceleratorId) -> bool
pub fn eq(&self, other: &AcceleratorId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &AcceleratorId) -> bool
pub fn ne(&self, other: &AcceleratorId) -> bool
This method tests for !=
.
impl Copy for AcceleratorId
impl Eq for AcceleratorId
impl StructuralEq for AcceleratorId
impl StructuralPartialEq for AcceleratorId
Auto Trait Implementations
impl RefUnwindSafe for AcceleratorId
impl Send for AcceleratorId
impl Sync for AcceleratorId
impl Unpin for AcceleratorId
impl UnwindSafe for AcceleratorId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more