pub enum WriteError {
Show 14 variants
Hid(String),
DeviceNotFound,
DeviceUnreachable {
index: u8,
},
FeatureUnsupported {
feature_hex: u16,
},
EmptyDpiList,
Hidpp(String),
HidppFeature {
operation: HidppOperation,
feature_hex: u16,
kind: HidppFeatureErrorKind,
},
UnsupportedResponse {
operation: HidppOperation,
feature_hex: u16,
},
RequestTimedOut {
operation: HidppOperation,
},
RuntimeInit {
message: String,
},
AgentUnavailable,
InvalidLightValue {
control: String,
value: u16,
},
LightUnsupported {
control: String,
},
AmbiguousRawDevice,
}Expand description
Error returned by HID++ read/write operations.
Serializable + Clone so it can cross the agent↔GUI IPC unchanged: the GUI
classifies a device read/write error as permanent (FeatureUnsupported /
EmptyDpiList) vs transient, so the discriminating variant must survive the
wire — stringifying it would collapse every case to “transient” and a device
that genuinely lacks a feature would be re-probed forever. Variant order is
therefore wire format: changes require a PROTOCOL_VERSION bump (guarded
by openlogi-ipc/tests/wire_format.rs).
Variants§
Hid(String)
HID transport error serialized as text.
async_hid::HidError isn’t Serialize, so carry its message as text;
the typed error is never matched on (only constructed + displayed).
DeviceNotFound
No currently connected device matched the requested route.
DeviceUnreachable
The HID node opened, but the target HID++ device index did not answer.
FeatureUnsupported
Device does not expose the requested HID++ feature.
EmptyDpiList
Device reported no valid DPI values.
Hidpp(String)
Generic HID++ protocol error serialized as text.
HidppFeature
HID++ feature error response.
Fields
operation: HidppOperationOperation being performed.
kind: HidppFeatureErrorKindHID++ feature error kind.
UnsupportedResponse
Device returned a structurally unsupported response.
Fields
operation: HidppOperationOperation being performed.
RequestTimedOut
HID++ request timed out.
Fields
operation: HidppOperationOperation that timed out.
RuntimeInit
Tokio runtime could not be initialized for a sync caller.
Background agent write path is unavailable.
InvalidLightValue
A standalone light value is outside the driver’s supported range.
Fields
LightUnsupported
The selected light driver does not implement a requested control.
AmbiguousRawDevice
Multiple raw HID nodes matched one physical route.
Trait Implementations§
Source§impl Clone for WriteError
impl Clone for WriteError
Source§fn clone(&self) -> WriteError
fn clone(&self) -> WriteError
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 WriteError
impl Debug for WriteError
Source§impl<'de> Deserialize<'de> for WriteError
impl<'de> Deserialize<'de> for WriteError
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 Display for WriteError
impl Display for WriteError
Source§impl Error for WriteError
impl Error for WriteError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()