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.
openlogi_hid::BackendError 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
impl Eq 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()
Source§impl PartialEq for WriteError
impl PartialEq for WriteError
Source§impl Serialize for WriteError
impl Serialize for WriteError
impl StructuralPartialEq for WriteError
Auto Trait Implementations§
impl Freeze for WriteError
impl RefUnwindSafe for WriteError
impl Send for WriteError
impl Sync for WriteError
impl Unpin for WriteError
impl UnsafeUnpin for WriteError
impl UnwindSafe for WriteError
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.