pub struct ReceiptExplain {
pub phase_name: &'static str,
pub compat_label: &'static str,
pub policy_name: &'static str,
pub mutation_summary: &'static str,
pub integrity_summary: &'static str,
pub cpi_summary: &'static str,
pub changed_field_count: u16,
pub segment_count: u8,
pub fingerprint_changed: bool,
pub segment_role_names: [&'static str; 8],
pub segment_role_count: u8,
}Expand description
Human-readable explanation of a decoded receipt.
Produced by DecodedReceipt::explain(). Every field is a semantic
label, not a raw number-designed for operator dashboards, CLI output,
and audit logs.
Fields§
§phase_name: &'static strPhase name (“Update”, “Init”, “Close”, “Migrate”, “ReadOnly”).
compat_label: &'static strCompatibility impact label (“None”, “Append”, “Migration”, “Breaking”).
policy_name: &'static strPolicy pack name that governed this instruction (“unknown” when not embedded).
mutation_summary: &'static strOne-sentence description of what mutation occurred.
integrity_summary: &'static strOne-sentence description of invariant check result.
cpi_summary: &'static strOne-sentence CPI summary.
changed_field_count: u16Number of individual fields changed (popcount of changed_fields mask).
segment_count: u8Number of segments that were modified.
fingerprint_changed: boolWhether the before/after fingerprints differ.
segment_role_names: [&'static str; 8]Role names for modified segments (up to 8). Use segment_role_count
to know how many entries are valid.
segment_role_count: u8Number of valid entries in segment_role_names.
Implementations§
Source§impl ReceiptExplain
impl ReceiptExplain
Sourcepub const fn with_policy_name(self, name: &'static str) -> ReceiptExplain
pub const fn with_policy_name(self, name: &'static str) -> ReceiptExplain
Return a copy with the given policy name injected.
The receipt wire format does not carry the policy pack name-only a bitmask of flags. Call this after constructing an explain from the decoded receipt when you know which policy pack governed the instruction (e.g. from the program manifest).
Sourcepub const fn with_segment_role(
self,
idx: u8,
name: &'static str,
) -> ReceiptExplain
pub const fn with_segment_role( self, idx: u8, name: &'static str, ) -> ReceiptExplain
Inject a segment role name at the given index.
Call once per modified segment, using the SegmentRole::name()
output for each bit set in segment_changed_mask. This enriches
the explain with human-readable role labels.