Skip to main content

stream_reset_code_defined

Function stream_reset_code_defined 

Source
const fn stream_reset_code_defined(draft: DraftVersion) -> bool
Expand description

Whether the draft defines a stream-reset error code vocabulary.

Drafts 07-10 do not, so a reset still carries the code but Effect::StreamReset reports code_defined: false — the code is a choice there rather than a claim. exec makes the same judgement for the actions it executes; this copy exists because the two callers are in different modules and neither owns the other’s privacy.

Exhaustive rather than !matches!(..), matching its twin in exec: the negated form would hand a draft nobody had read the answer true and publish code_defined about a vocabulary that may not exist.