Expand description
SRD-32a — Op Wrapper Registry.
Single source of truth for the named wrappers that compose around an adapter’s base dispenser: which op-template fields each owns, what triggers them, what constraints they declare, and how they describe their assignment to an op.
The companion module crate::wrapper_resolver consumes the
registrations submitted via inventory::submit! to compute
the per-op composition order. The wrapper implementations
themselves live in crate::wrappers and
crate::validation — this module is data, not code.
Structs§
- Wrapper
Name - Stable identifier for a wrapper. Used in workload override
directives, CLI flags, and registry lookups. Wrapped around a
&'static strso the value is always interned at the registration site and lookups are pointer-cheap. - Wrapper
Registration - One entry per registered wrapper. Entries are submitted at
link time via
inventory::submit!and collected at startup into theWrapperRegistryview. - Wrapper
Registry - Live view over every registered wrapper. Built once at
startup from the
inventorycollection.
Enums§
- Wrapper
Level - SRD-92 / ExecUnification — the execution-graph level(s) a wrapper is legal
at. Today every wrapper is op-level; the unified scaffold (Step 5) reads
this to place a layer at the right level once layering goes cross-level.
Kept decoupled from executor’s WIP
ShellKinduntil the unification lands. - Wrapper
Subject - SRD-82/92 — the execution unit a wrapper’s trigger inspects, generalising
the registry across levels. An op wrapper reads the
Opvariant; a phase wrapper thePhasevariant (scenario/session variants join when those levels wire up). Op-level wrappers guard withSelf::op; the resolver only offers a wrapper subjects of the level it declares (applies_at), so a well-formed wrapper never sees a foreign subject — the guard is a belt-and-bracesNonereturn.
Functions§
- closest_
match - Find the closest match in a list of candidate names, using
Levenshtein edit distance. Returns
Nonewhen no candidate is within distance 3, since beyond that the suggestion is noise.