intel_crashlog/analysis/report.rs
1// Copyright (C) 2026 Intel Corporation
2// SPDX-License-Identifier: MIT
3
4use super::Analyzer;
5use super::tag::Tag;
6#[cfg(not(feature = "std"))]
7use alloc::vec::Vec;
8
9/// Structured report containing analysis results and diagnostic findings.
10///
11/// The report aggregates all triage tags identified during crash log analysis.
12/// Tags are ordered by priority, with higher-priority findings appearing first.
13pub struct AnalysisReport {
14 /// Triage tags ordered by priority (highest priority first).
15 pub tags: Vec<Tag>,
16}
17
18impl Analyzer<'_> {
19 pub(super) fn build_report(mut self) -> AnalysisReport {
20 let mut tags = Vec::new();
21
22 while let Some(tag) = self.tags.pop() {
23 tags.push(tag.tag);
24 }
25
26 AnalysisReport { tags }
27 }
28}