Skip to main content

validate_summary_spans

Function validate_summary_spans 

Source
pub fn validate_summary_spans<F>(
    summary: &str,
    spans: &[SummarySpan],
    authority_fold: F,
) -> Result<(), SummarySpanError>
where F: FnMut(&[EventId]) -> SourceAuthority,
Expand description

Validate summary spans against ADR 0015 structural invariants.

authority_fold recomputes the authority for one span from its derived_from_event_ids. The cached max_source_authority must match it.