pub enum Form {
Show 19 variants
Bool,
U64,
F64,
Str,
StrList,
Duration,
ParamRef,
GkSource,
GkExpr,
PathExpr,
MetricSelector,
Vocab(&'static [&'static str]),
Node(&'static dyn EnumerableNode),
NamedMap(&'static dyn EnumerableNode),
ListOf(&'static dyn EnumerableNode),
MapOf(&'static Form),
ListOfForm(&'static Form),
FreeMap,
FreeScalar,
}Expand description
A valid value form for one element. Nested node kinds are direct references — the grammar graph carries itself.
Variants§
Bool
Boolean (elements document accepted 0/1/“on”/“off” sugar).
U64
Unsigned integer (numeric strings accepted where the element documents it).
F64
Float.
Str
Plain string.
StrList
List of strings (globs where documented).
Duration
Duration: "2.5h", bare seconds, or a {param} ref.
ParamRef
A {param} / iter-var reference accepted alongside the
literal forms listed beside it.
GkSource
A polydat bindings SOURCE block (multi-line grammar).
GkExpr
A single polydat expression (predicates, metric values).
PathExpr
A capture / result path expression (/0/field,
rows[*].col — SRD-70).
MetricSelector
A metric selector ("family, label=value").
Vocab(&'static [&'static str])
One of a closed vocabulary of literal values.
Node(&'static dyn EnumerableNode)
A nested node of the referenced kind.
NamedMap(&'static dyn EnumerableNode)
A map of AUTHOR-CHOSEN names, each value a node of the
referenced kind (e.g. phases: → phase nodes).
ListOf(&'static dyn EnumerableNode)
A list whose entries are nodes of the referenced kind.
MapOf(&'static Form)
A map of author-chosen names whose VALUES all take the
given form (e.g. capture: name → PathExpr).
ListOfForm(&'static Form)
A list whose entries all take the given form.
FreeMap
An open map (author-chosen keys, unmodeled values).
FreeScalar
An open scalar (adapter-defined or free text).