pub struct DeviceActionDecl {
pub id: String,
pub name: String,
pub description: String,
pub keystroke: KeystrokeDecl,
pub prerequisite: Option<String>,
}Expand description
One device-resolved action, owned. Mirrors
DeviceAction.
Deliberately not an ActionDecl with extra fields. It carries no
trigger, because a keystroke has no position to send, and no params,
because a resolved binding stores none — so the two combinations ADR-0021
calls impossible have nowhere to live rather than being checked for. A reader
of a log can also tell which kind they are looking at without checking a flag.
Serde ignores fields it was not asked about, so a hand-written JSON addon can
still write "trigger" beside one of these. What it cannot do is make it
mean anything, because nothing reads it. That is the accurate claim;
“unrepresentable” would be too strong.
Fields§
§id: StringStable identifier, stored as the binding’s provenance. Shares one
namespace with ActionDecl::id; the daemon refuses a collision by name
rather than resolving it to whichever list it looked in first.
name: StringWhat to call it.
description: StringWhat it does, in a sentence.
keystroke: KeystrokeDeclThe default the binding editor starts from, which the user may change.
prerequisite: Option<String>The step outside Nobble the user must also take (FR-024), if any. Free text, shown at the moment of binding, and never parsed.
Trait Implementations§
Source§impl Clone for DeviceActionDecl
impl Clone for DeviceActionDecl
Source§fn clone(&self) -> DeviceActionDecl
fn clone(&self) -> DeviceActionDecl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceActionDecl
impl Debug for DeviceActionDecl
Source§impl<'de> Deserialize<'de> for DeviceActionDecl
impl<'de> Deserialize<'de> for DeviceActionDecl
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>,
Source§impl PartialEq for DeviceActionDecl
impl PartialEq for DeviceActionDecl
Source§fn eq(&self, other: &DeviceActionDecl) -> bool
fn eq(&self, other: &DeviceActionDecl) -> bool
self and other values to be equal, and is used by ==.