Skip to main content

Module result_value

Module result_value 

Source
Expand description

API value for a rule result, ShowData.value, or ShowData.suggestion.

This is the single API-facing value representation shared by all three sites, expanded into every declared unit for measure/ratio on data inputs, and into every unit in the result type’s family for rule results. It sits at the crate root (not under evaluation/) because planning::execution_plan::ShowData needs it too, and planning must not import evaluation. The plan/eval-internal representation is the canonical planning::semantics::LiteralValue; this module is the boundary between the two.

Magnitudes are Decimal (28-scale API boundary). JSON still emits decimal strings via Decimal’s default serde.

Structs§

CalendarResult
Calendar value (a measure whose unit is a calendar unit, e.g. 3 months) on a result.
RangeResult
Both endpoints of a range result.
RowReference
A row of an instance list. Its data and rules are Response.rows[index].
RowResult
Data and rules of one distinct row reached by a response, filled once.
RuleResultValue
API value shared by flattened crate::evaluation::response::RuleResult, ShowData.value / suggestion, and explanation Data / Rule nodes.
SpecResult
A spec instance returned by a rule, including the values needed to run it again.
SpecRuleResult
One rule of a SpecResult, or one evaluated data slot of a SpecResult. A spec-valued rule nests another SpecResult in RuleResultValue::spec.

Enums§

RuleResultValueFailure
Why building a RuleResultValue from a canonical LiteralValue failed.

Functions§

rule_result_value_failure_message
Human-readable veto message for a RuleResultValueFailure.
type_scoped_result_value_from_literal
Build a RuleResultValue using only units declared on lemma_type (Show data fill/suggestion).