pub struct RuleResult {
pub rule: EvaluatedRule,
pub veto_detail: Option<VetoType>,
pub vetoed: bool,
pub veto_reason: Option<String>,
pub rule_type: String,
pub result: Option<RuleResultValue>,
pub explanation: Option<Explanation>,
/* private fields */
}Expand description
Result of evaluating a single rule. Struct fields match the API JSON shape.
Fields§
§rule: EvaluatedRule§veto_detail: Option<VetoType>§vetoed: bool§veto_reason: Option<String>§rule_type: String§result: Option<RuleResultValue>Flattened value fields, including result when the rule is not vetoed.
explanation: Option<Explanation>Implementations§
Source§impl RuleResult
impl RuleResult
Sourcepub fn result(&self) -> Option<&str>
pub fn result(&self) -> Option<&str>
Engine-rendered one-liner from the flattened RuleResultValue.
Sourcepub fn is_missing_data(&self) -> bool
pub fn is_missing_data(&self) -> bool
True when this result is a VetoType::MissingData or VetoType::MissingRowData veto.
Value and other vetoes are settled answers; leftover live keys in
Self::missing_data must not drive prompts or human “Missing data” display.
Sourcepub fn missing_data(&self) -> &[String]
pub fn missing_data(&self) -> &[String]
Unbound caller data paths still live for this rule (DataPath::input_key),
in evaluation / decision-tree order (contrast Show.data declaration order).
Sourcepub fn missing_data_options(&self) -> &IndexMap<String, Vec<EvaluateDataValue>>
pub fn missing_data_options(&self) -> &IndexMap<String, Vec<EvaluateDataValue>>
Closed sets for this rule’s missing inputs. Keys are a subset of Self::missing_data.
Sourcepub fn to_literal(&self) -> LiteralValue
pub fn to_literal(&self) -> LiteralValue
Reconstruct the evaluated LiteralValue from committed RuleResultValue fields.
Panics if the rule is vetoed or fields cannot be reconstructed.