One rule result from Lemma.evaluate/3, as returned in Lemma.Response.results.
Value fields (measure, ratio, number, …) mirror the flattened Rust
RuleResultValue. row is a list row reference: its "index" points into
Lemma.Response.rows. list holds the items of a list value, each a raw value
map (rows carry "row"). explanation is the raw explanation JSON map when present
(tagged by "type"); pattern-match on that tag directly.
Summary
Functions
Builds a Lemma.RuleResult from one value of the decoded Lemma.evaluate/3 JSON
"results" map. Optional fields are absent (not null) from the API JSON when
unset; Map.get/3 yields nil for those.
Types
@type t() :: %Lemma.RuleResult{ boolean: boolean() | nil, calendar: map() | nil, date: String.t() | nil, explanation: map() | nil, list: [map()] | nil, measure: %{optional(String.t()) => String.t()} | nil, missing_data: [String.t()] | nil, number: String.t() | nil, range: map() | nil, ratio: %{optional(String.t()) => String.t()} | nil, result: String.t() | nil, row: map() | nil, rule_type: String.t(), spec: map() | nil, text: String.t() | nil, time: String.t() | nil, unit: String.t() | nil, veto_reason: String.t() | nil, vetoed: boolean() }
Functions
Builds a Lemma.RuleResult from one value of the decoded Lemma.evaluate/3 JSON
"results" map. Optional fields are absent (not null) from the API JSON when
unset; Map.get/3 yields nil for those.