Expand description
Parameter domains.
A domain is the set of values a parameter may legally take. Per
SRD-0004 D2 each parameter kind owns a sub-enum of its admissible
shapes (IntegerDomain, DoubleDomain, StringDomain,
SelectionDomain; Boolean has no payload), and a view enum
Domain borrows into whichever sub-enum a Parameter carries.
This module defines the owned sub-enums, their native-type
operations (membership, cardinality, boundaries, sampling,
enumeration), the Domain view wrapper that lifts those ops into
Value form, and the SelectionResolver trait the Selection
External variant defers to at plan-compilation time.
Gaps flagged for later SRD revisions:
StringDomain::Regexsampling. Theregexcrate does not provide regex-backed generation; a future slice can plug in a generator crate or defer sampling to the caller. Until then,Domain::samplepanics for theRegexvariant.SelectionDomain::Externalsampling. Registry-aware sampling is specified in SRD-0004 D15 but not yet wired up;Domain::samplepanics for theExternalvariant.
Structs§
- Labeled
Entry - Label attached to an external selection value for display purposes.
- Regex
Pattern - A validated regex, carrying both the source pattern and the compiled automaton.
- Resolver
Id - Opaque identifier naming an external selection resolver.
Enums§
- Cardinality
- How many distinct values a domain contains.
- Domain
- Borrowed view over a parameter’s domain, pinned to the parameter’s
name so operations can produce properly-provenanced
Values. - Domain
Error - Errors produced by domain constructors and operations.
- Double
Domain - Double-precision float domain: inclusive range with finite, non-
NaNbounds. - Integer
Domain - Integer domain: either an inclusive numeric range or a finite discrete set.
- Selection
Domain - Selection domain: a set the user can pick multiple items from.
- String
Domain - String domain: accept-all or regex-matched.
Traits§
- Labeled
Selection Resolver - Extension trait: values carry UI labels in addition to their canonical ids.
- Selection
Resolver - Resolves the set of valid values for one external selection.
- Selection
Resolver Registry - Host registry. The host (typically the embedding system) provides an implementation that knows how to look up resolvers by id.