pub struct FactProvenance {
pub fact_name: &'static str,
pub key: String,
pub outcome: FactOutcome,
pub detail: Option<String>,
}Expand description
A record that a policy consulted a fact while reaching its decision.
Fact-backed policies (such as crate::RebacPolicy) attach one of these per
fact lookup to their PolicyEvalResult::Granted or
PolicyEvalResult::Denied node, so a decision’s inputs are explained
alongside its outcome. Provenance is intentionally type-erased — a fact
name, a rendered key, an outcome, and optional detail — rather than the
typed crate::FactKey, so it lives on the non-generic result tree and is
straightforward to log.
Operational fact-load telemetry (latencies, batch fan-out, cache hits) is a
separate concern surfaced through tracing spans (gatehouse.fact_load);
this type is for per-decision explanation.
Fields§
§fact_name: &'static strThe crate::FactKey::NAME of the consulted fact (e.g. "relationship").
key: StringA human-readable rendering of the fact key that was looked up.
outcome: FactOutcomeHow the load resolved.
detail: Option<String>Optional extra detail, such as the backend error message when
outcome is FactOutcome::Error.
Implementations§
Trait Implementations§
Source§impl Clone for FactProvenance
impl Clone for FactProvenance
Source§fn clone(&self) -> FactProvenance
fn clone(&self) -> FactProvenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FactProvenance
impl Debug for FactProvenance
Source§impl Display for FactProvenance
impl Display for FactProvenance
impl Eq for FactProvenance
Source§impl PartialEq for FactProvenance
impl PartialEq for FactProvenance
Source§fn eq(&self, other: &FactProvenance) -> bool
fn eq(&self, other: &FactProvenance) -> bool
self and other values to be equal, and is used by ==.