rapx/analysis/unsafety_isolation/
isolation_graph.rs1use rustc_hir::def_id::DefId;
2
3#[derive(Debug, Clone)]
4pub struct IsolationGraphNode {
5 pub node_id: DefId,
6 pub node_type: usize,
8 pub node_name: String,
9 pub node_unsafety: bool,
10 pub constructors: Vec<DefId>,
12 pub callees: Vec<DefId>,
14 pub methods: Vec<DefId>,
16 pub callers: Vec<DefId>,
17 pub visited_tag: bool,
18 pub is_crate_api: bool,
20}
21
22impl IsolationGraphNode {
23 pub fn new(
24 node_id: DefId,
25 node_type: usize,
26 node_name: String,
27 node_unsafety: bool,
28 is_crate_api: bool,
29 ) -> Self {
30 Self {
31 node_id,
32 node_type,
33 node_name,
34 node_unsafety,
35 constructors: Vec::new(),
36 callees: Vec::new(),
37 methods: Vec::new(),
38 callers: Vec::new(),
39 visited_tag: false,
40 is_crate_api,
41 }
42 }
43}