#[non_exhaustive]pub enum MatcherField {
TrackAlias,
SubgroupId,
Priority,
}Expand description
One Matcher key, named so a report about it is typed rather than a
string.
Only the keys that can be unmatchable are here, and that is the whole
point of the type: it is carried by
ImpairmentKind::ShapeRuleUnmatchable,
which fires when a rule keys on something this draft and stream kind
cannot carry. The other four keys — side, group_id, object_id and
every_nth — are present on every framed unit by construction, so a rule
keyed on one of them that fails to match failed on its value, which is
the rule working, not a rule that cannot work.
#[non_exhaustive] with no Default: a later draft that makes another
key optional adds a variant, and no key is a meaningful zero.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TrackAlias
Matcher::track_alias, against a unit whose stream carried none —
every fetch stream.
SubgroupId
Matcher::subgroup_id, against a unit whose header carried none —
eight drafts in first-object mode, and 17-19 in reserved mode 3.
Never reported about a datagram, which carries no subgroup ID on any
draft. That is not a fact about one header, so it is a pre-run
refusal — Capabilities::admit_class — rather than something a run
discovers. See Matcher::unmatchable_fields_datagram.
Priority
Matcher::priority, against a unit whose header set the
default-priority bit — drafts 15-19, on a subgroup object and on a
datagram alike.
Implementations§
Source§impl MatcherField
impl MatcherField
Sourcepub(crate) const fn bit(self) -> u8
pub(crate) const fn bit(self) -> u8
This field’s bit in a per-class report-once mask.
A four-variant enum fits one byte, so the “reported already” state
for a whole class is one AtomicU8 and the check is one relaxed
fetch_or — taken only when a field is actually absent, so a
profile whose keys are all carried never touches it.
Trait Implementations§
Source§impl Clone for MatcherField
impl Clone for MatcherField
Source§fn clone(&self) -> MatcherField
fn clone(&self) -> MatcherField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more