Expand description
JSON API types for Engine boundary documents.
Types reachable from crate::Engine carry no JSON-shaping serde attributes
and no custom serde except exact scalar codecs (rationals, date/time strings,
decimal strings). JSON shape for show / run / SDK documents lives only in
lemma::api.
Structs§
- Calendar
Result - Lemma
Type - Literal
Value - Measure
Unit - Named
Bound - Unit-scoped bound
{ value, unit }(decimal magnitude + unit name). - Path
Segment - One
useshop on a Show data or rule path. - Range
Result - Ratio
Unit - Rational
Factor - Exact rational factor as reduced numer/denom integer strings.
- Response
- Rule
Result - Rule result JSON: flattened value fields, no rule/veto_detail.
- Rule
Result Value - Show
Branch - Show
Rule
Enums§
- ListKey
- How a list addresses its rows: by row number, or by the ordered
-> keyfields. - Measure
Trait - Show
Conversion Target - Show
Expression - Resolved expression on a Show rule branch.
- Show
List Command - Postfix list command on Show.
- Sort
Direction - Type
Defining Spec - Type
Extends - Type
Specification - Value
Kind - Externally tagged value payload matching today’s
ValueKindSerialize shape.
Functions§
- evaluate_
data_ value_ from_ json_ value - Parse one JSON value into a
EvaluateDataValue. JSONnullmeans omit:Ok(None). Anulllist item is a request error: a list has no unsupplied row. - measure_
pattern patternfor a measure value.- number_
pattern patternfor a number value.- parse_
evaluate_ data_ object - Optional
dataobject from MCP / HTTP JSON → overlay tree forcrate::Engine::evaluate.null/ omitted → empty map. Non-object → error. JSONnullvalues are omitted. - ratio_
pattern patternfor a ratio value.- resolve_
evaluate_ rules - MCP
rules/ HTTP query?rule=— one name, a JSON array of names, or omit (all). - row_
def_ name LemmaRow_plus the row spec identity, injectively escaped to[A-Za-z0-9_-](a valid OpenAPI component name):_becomes__, any other character_<hex code point>_. One name per identity, so documents of different specs agree on shared row specs.- show_
document - The Show document: a Draft 2020-12 JSON Schema for the spec’s evaluation-data inputs.