Skip to main content

Support

Enum Support 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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:

  1. a site whose return type is the other enum (Pass at StreamOpen, Reject at Object, …) — two variants, NotAttemptable::SiteReturnsAction and NotAttemptable::SiteReturnsStreamAction, so that the table says which direction the mismatch runs in;
  2. a kind whose unit does not exist at this site — ActionKind::ReplaceObject anywhere but Site::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: NotAttemptable

Which family, so a reader is not left to infer it.

§refusal: Refusal

What the table reports. Never emitted as an event.

§

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:

  1. any stream on such a draft, where the stream header decode returns UnsupportedDraft first — see draft_is_compiled, which is why this verdict is a build fact and not only a draft fact.
  2. the control site on such a draft, where AnyControlMessage::decode has no arm and ControlStreamParser::feed steps over every frame before the hook is offered one. Same fact as case 1, a different decoder, and a different report — which is what Instead is 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.

Fields

§refusal: Refusal

What the table reports. Never emitted as an event.

§instead: Instead

What the run emits instead, and how often.

Trait Implementations§

Source§

impl Clone for Support

Source§

fn clone(&self) -> Support

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Support

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Support

Source§

impl PartialEq for Support

Source§

fn eq(&self, other: &Support) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Support

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more