#[non_exhaustive]pub enum ReadError {
Short {
needed: usize,
},
ShortClaim {
claim: ClaimId,
needed: usize,
trace: Option<TraceContext>,
},
TooFewSamples {
needed: usize,
},
Contract(Contract),
Detached,
}Expand description
A read that failed.
One enum serves every read on every port, so a variant can be unreachable
for the method that returns it: TooFewSamples
belongs to CoherentSignals::read_coherent alone, and
Caller::reply never returns Contract. Each
method documents what it can return.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Short
The output buffer is too short. Nothing was consumed.
ShortClaim
The output buffer is too short for the next claim’s arguments
(Handler::next_claim alone). Nothing was consumed: the claim stays
the next one, and a later next_claim with a buffer of at least
needed bytes presents it under the same claim. The id is reported
so that a provider can settle the claim without reading its
arguments; the generated serve settles it
CallError::Transport(Transport::Corrupt), because an argument that
does not fit the serving interface’s MAX_BUFFER_SIZE — its largest
argument or reply payload, larger than any valid encoding of its
members — is not a well-formed encoding of one; a claim naming another
interface may be validly larger, and is settled the same, because the
serving step cannot read it (ADR-0021 decision 5, amended
2026-09-28).
Fields
trace: Option<TraceContext>The trace context the sender passed to command or query, or
None, under the delivery rules on Handler that apply to
Claim::trace. A provider that settles the claim without
reading it has the context here.
TooFewSamples
samples has fewer entries than ords. Nothing was consumed.
Contract(Contract)
A contract error, such as an unknown interaction.
Detached
The runtime behind the port is gone.