archunit/common/projection/
projected_node.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::common::Edge;

/// A graph node with its incoming and outgoing raw dependency evidence.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ProjectedNode {
    /// The raw graph identifier represented by this node.
    pub label: String,
    /// Non-self dependencies targeting this node.
    pub incoming: Vec<Edge>,
    /// Non-self dependencies originating from this node.
    pub outgoing: Vec<Edge>,
}

impl ProjectedNode {
    pub(crate) fn new(label: String, incoming: Vec<Edge>, outgoing: Vec<Edge>) -> Self {
        Self {
            label,
            incoming,
            outgoing,
        }
    }
}