#[non_exhaustive]pub enum Support {
Yes,
No(Refusal),
Conditional(Precondition),
NotAttemptable {
why: NotAttemptable,
refusal: Refusal,
},
Unreachable {
refusal: Refusal,
instead: Instead,
},
}Expand description
Whether a capability is available.
Five verdicts, not three. The earlier design had Yes / No /
Conditional only, and a large part of the published matrix fits none
of them: 30 site×kind pairs are ruled out by the return type (a site
that returns StreamAction cannot be
handed an Action, and four ActionKinds
have no constructor at all), and every cell on a draft this build did not
compile names a refusal the engine can never emit because the hook is
never invoked there. Both classes used to be written — or “unreachable” in prose,
which tests/action_matrix.rs cannot assert. They are now verdicts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Yes
The engine executes it and the wire changes.
No(Refusal)
Attemptable, and the engine refuses it with this reason. Exactly
one ProxyEvent::ActionRefused per attempt.
Conditional(Precondition)
Executable, gated on a per-unit fact the table caller did not supply. The precondition is named so a scenario can test for it.
NotAttemptable
No value of Action or
StreamAction can carry this kind to
this site, so the engine can never be asked and no
ActionRefused can ever be emitted.
Three families, and NotAttemptable names which:
- a site whose return type is the other enum (
PassatStreamOpen,RejectatObject, …) — two variants,NotAttemptable::SiteReturnsActionandNotAttemptable::SiteReturnsStreamAction, so that the table says which direction the mismatch runs in; - a kind whose unit does not exist at this site —
ActionKind::ReplaceObjectanywhere butSite::Object.
refusal is what the published table reports and is never emitted
as an event. For both families it is a variant that is reachable
elsewhere in the matrix (Refusal::WrongSite). The split is per
variant, not per cell: a variant is table-only when no cell
anywhere emits it as a real ActionRefused.
What the sweep observes is zero action events — no ActionApplied,
no ActionRefused, no ActionFailed — and actions_refused unchanged.
It is not zero events of any kind: per-stream impairments are a
property of the stream, not of the kind swept, so a stream the framer
gave up on still reports its one Impairment { FramerBypass { .. } }
while every NotAttemptable cell on it stays silent.
Fields
why: NotAttemptableWhich family, so a reader is not left to infer it.
Unreachable
Constructible and well-formed, but the hook is never invoked
for this cell, so nothing is ever attempted and no ActionRefused
is ever emitted.
Two occupants, each reporting what the run does emit rather than
the refusal it cannot. Both are a draft this build did not compile,
one decoder apart — see object_framing_bypass:
- any stream on such a draft, where the stream header decode
returns
UnsupportedDraftfirst — seedraft_is_compiled, which is why this verdict is a build fact and not only a draft fact. - the control site on such a draft, where
AnyControlMessage::decodehas no arm andControlStreamParser::feedsteps over every frame before the hook is offered one. Same fact as case 1, a different decoder, and a different report — which is whatInsteadis for.
There was a third, and its going is worth a sentence because it is
the shape of thing this enum is easiest to be wrong about. A fetch
stream on drafts 18 and 19 used to occupy this verdict, on the
grounds that nothing on such a stream settles the Group Order its
Group IDs are differences against. Nothing on the stream still
does; the FETCH that opened it always did, and the session reads it
now — see fetch_group_order_is_needed. The cell was answering a
question about a draft with a fact about one component.
A caller that reads the table by draft number alone will not see
case 1 coming, which is why the table answers by build rather than by
number. It is not a state a session can now reach —
ProxySession::run refuses an
uncompiled draft with
ProxyError::DraftNotCompiled
before it dials — but the table is answerable without a session, and a
caller asking it about a draft this build does not carry has to be
told the truth about that draft rather than about draft numbers in
general.