archunit/graph/projection/
graph_report_snapshot.rsuse super::{GraphReportEdge, GraphReportNode, GraphReportSummary};
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub struct GraphReportSnapshot {
pub title: String,
pub nodes: Vec<GraphReportNode>,
pub edges: Vec<GraphReportEdge>,
pub summary: GraphReportSummary,
}
impl GraphReportSnapshot {
#[must_use]
pub fn new(
title: impl Into<String>,
nodes: impl IntoIterator<Item = GraphReportNode>,
edges: impl IntoIterator<Item = GraphReportEdge>,
summary: GraphReportSummary,
) -> Self {
Self {
title: title.into(),
nodes: nodes.into_iter().collect(),
edges: edges.into_iter().collect(),
summary,
}
}
}