#[non_exhaustive]pub struct SkillKeybinding {
pub chord: String,
pub action: String,
}Expand description
A keyboard shortcut declared by a skill extension manifest.
§Examples
use zeph_skills::extensions::SkillKeybinding;
let yaml = "chord: ctrl+shift+r\naction: run-my-skill\n";
let kb: SkillKeybinding = serde_norway::from_str(yaml).unwrap();
assert_eq!(kb.chord, "ctrl+shift+r");
assert_eq!(kb.action, "run-my-skill");Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.chord: StringKey chord string in platform-normalized notation (e.g. "ctrl+shift+r").
action: StringAction identifier dispatched when the chord is pressed.
Trait Implementations§
Source§impl Clone for SkillKeybinding
impl Clone for SkillKeybinding
Source§fn clone(&self) -> SkillKeybinding
fn clone(&self) -> SkillKeybinding
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 moreSource§impl Debug for SkillKeybinding
impl Debug for SkillKeybinding
Source§impl<'de> Deserialize<'de> for SkillKeybinding
impl<'de> Deserialize<'de> for SkillKeybinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SkillKeybinding
impl PartialEq for SkillKeybinding
Source§fn eq(&self, other: &SkillKeybinding) -> bool
fn eq(&self, other: &SkillKeybinding) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SkillKeybinding
impl Serialize for SkillKeybinding
impl StructuralPartialEq for SkillKeybinding
Auto Trait Implementations§
impl Freeze for SkillKeybinding
impl RefUnwindSafe for SkillKeybinding
impl Send for SkillKeybinding
impl Sync for SkillKeybinding
impl Unpin for SkillKeybinding
impl UnsafeUnpin for SkillKeybinding
impl UnwindSafe for SkillKeybinding
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