pub struct Chord {
pub mods: Mods,
pub key: Key,
}Expand description
One key chord: modifiers plus a key.
Fields§
§mods: Mods§key: KeyImplementations§
Source§impl Chord
impl Chord
Whether the chord may become a native menu key equivalent. Only ones with ⌘ / Ctrl (or a
function key) do: a bare V or an Alt/Shift-only key would be swallowed by the menu while
the user types into a text field, so those stay the app’s own window shortcuts.
Source§impl Chord
impl Chord
pub const fn new(mods: Mods, key: Key) -> Self
Sourcepub fn parse(text: &str) -> Result<Chord, ParseError>
pub fn parse(text: &str) -> Result<Chord, ParseError>
Parse one shortcut (Mod+Shift+S, Cmd+Z, Ctrl+Alt+Delete, ⌘⇧S, Mod++, F5).
Sourcepub fn portable(&self) -> String
pub fn portable(&self) -> String
The portable form (Mod+Ctrl+Alt+Shift+K), what settings files and discovery carry.
Trait Implementations§
impl Copy for Chord
Source§impl<'de> Deserialize<'de> for Chord
impl<'de> Deserialize<'de> for Chord
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Chord
Source§impl Ord for Chord
impl Ord for Chord
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Chord
impl PartialOrd for Chord
impl StructuralPartialEq for Chord
Auto Trait Implementations§
impl Freeze for Chord
impl RefUnwindSafe for Chord
impl Send for Chord
impl Sync for Chord
impl Unpin for Chord
impl UnsafeUnpin for Chord
impl UnwindSafe for Chord
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