#[non_exhaustive]pub enum Error {
Device(Reply),
Host(HostErr),
Skew(Skew),
Io(Error),
Sdk(SdkErr),
}Expand description
THERE IS NO DECODE VARIANT, deliberately: a rejected frame is a fact about link quality, not
something a caller can act on mid-recording (the Python walk() killed the run over one flipped
bit). StreamReader resyncs and counts it; every Error here is transport, host or device.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Device(Reply)
The device answered and REFUSED. Only the typed methods mint this — the generated
Commands and Device::unlock_with: Device::raw_cmd returns rc != 0 as data
because its caller holds the Reply, but a typed method asked for a value and a refusal has
none — else a struct of zeros from no keys.
Host(HostErr)
THIS HOST refused, and nothing went to the wire — an argument outside the contract’s charset, a deadline that expired, a transport that returned less than its framing declared. The token set is closed; a conforming library mints none of its own.
Skew(Skew)
The device is not one this host may drive. Always from the bind.
Io(Error)
The link, the filesystem or the operating system failed. Also carries this crate’s argument-validation failures that are not part of the closed host set — a register name that is not in the contract, a reply that is not JSON, an ambiguous singular accessor.
Sdk(SdkErr)
usb3 only.A device driver call failed, or a symbol was not in the library.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()