pub const DEFAULT_DRAFT: DraftVersion;Expand description
The draft a session configuration takes when the caller names none.
Draft-14 wherever the build has it, which is every build that did not trim its drafts, and the newest draft the build does have otherwise. The value is what it always was on a full build; what changes is that a reduced-draft build no longer starts out naming a draft it cannot speak.
§Why a default cannot simply refuse
Default returns a value, so it has no way to tell a caller that the
build left out the draft it would have chosen. Keeping draft-14 regardless
does not avoid the problem, it moves it: on a build without draft-14
draft_is_compiled answers false, supports_matcher refuses every
key on every stream kind, and a class rule that is perfectly well formed is
reported as naming a key the draft does not carry. That is a configuration
error raised against the author of a configuration that has nothing wrong
with it.
§The check below is a compile-time one, and it has to be
A test asserting the same thing would never run. The per-draft rows build
this crate fourteen times under --no-default-features --features draftNN
and stop at clippy --all-targets, so a reduced-draft build is compiled
fourteen times a round and its tests are run none — and a reduced-draft
build is the only kind that can have this defect. A const assertion fails
the compile, which is the one thing those rows do look at.
§Ablated, and the numbers are the account of why this survived
Putting the old value back — draft-14 chosen without consulting the build:
error[E0080]: evaluation panicked: the default draft is one this build did not compile
error: could not compile `moqtap-proxy` (lib) due to 1 previous errorExit 101 under --no-default-features --features draft07, exit 101 under
the same with draft19, and exit 0 under --all-features. The build every
round runs first cannot see this defect at all, and the fourteen that can
are compiled and never run.