Section
Getting Started
API
Features
Guides
Reference
AI Access
Errors
The Error enum and the Result aliasEvery fallible call returns Result<T>, the crate's alias for core::result::Result<T, Error>.
Error is #[non_exhaustive], so any match needs a wildcard arm.
| Variant | Meaning |
|---|---|
Io(std::io::Error) | An underlying serial or OS error. |
NotFound | No device matched the expected VID/PID. |
NoReply | No reply to the version query during the handshake: wrong port or baud, or not a Medius box. |
BadProtoVer { got } | The box replied, but its proto_ver wasn't 5; got carries the reported value. See the handshake. |
QueryTimeout | A query hit its deadline with no RESP back. |
Disconnected | The device disconnected. |
FrameTooLong | A payload was over the 512-byte frame limit. |
CatchTableFull { needed, limit } | A catch_events call needs needed entries and the box holds limit. Refused before anything is sent, because the box reports a refusal only in a flag. |
EmptySubscription | A catch subscription named no filters, so the stream would never yield. |
CaptureNotApplicable { class } | A Capture on an input class, which arrives decoded and carries no packet. |
NotAnInputFilter { class } | input_events was given a traffic class, which cannot decode to an input edge. |
WildcardNotInput | CatchFilter::everything() covers traffic too; use CatchFilter::all_input(). |
RelativeDirection { direction, what } | A call addressed Direction::With or Against where only a fixed sign or edge fits; what names it. Those are resolved against the bearing at emit time, after the call is made; use Both, Positive, or Negative. |
HalfEdgeInputFilter | An input subscription narrowed to one edge: without the release, a fresh press cannot be told from a chord. Match on Input::Press instead. |
ReservedId { class, id } | An exact id of 0xFFFF, which is the every-id sentinel on the wire, so the subscription would address the whole class instead. Only a media usage is wide enough to reach it. |
Update { op, status, arg } | The box refused a firmware update op. Carries the op, the UpdateStatus and its arg. |