#[non_exhaustive]pub enum ChannelObservation {
OutgoingReport {
request_id: Option<u64>,
report: ObservedReport,
},
IncomingReport {
request_id: Option<u64>,
report: ObservedReport,
},
MalformedIncomingReport {
report: ObservedReport,
},
ForeignIncomingReport {
report: ObservedReport,
},
RequestOutcome {
request_id: u64,
outcome: RequestOutcome,
},
}Expand description
A wire or request-lifecycle fact observed by a HidppChannel.
Request IDs are monotonically assigned within one channel lifetime. An
outgoing report with request_id: None is a fire-and-forget HID++ write or
a HidppChannel::write_raw_report
write. A parsed incoming report has an ID only when the channel matched it
to a pending request; None therefore identifies unsolicited or late
input.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OutgoingReport
A post-normalization report submitted to the raw transport.
Fields
report: ObservedReportThe exact bytes passed to the raw transport.
IncomingReport
A valid HID++ report read from the raw transport.
Fields
report: ObservedReportThe exact bytes returned by the raw transport.
MalformedIncomingReport
Raw incoming bytes carrying a HID++ report ID that failed HID++ report parsing.
Fields
report: ObservedReportThe exact bytes returned by the raw transport.
ForeignIncomingReport
An incoming report belonging to another protocol sharing this node —
Logitech DJ (0x20/0x21) on a Unifying receiver, for instance. It
says nothing about the HID++ exchange and the channel drops it.
Fields
report: ObservedReportThe exact bytes returned by the raw transport.
RequestOutcome
The terminal outcome of a request that expected a response.
Fields
outcome: RequestOutcomeHow the request ended.