dfir_lang/graph_ids.rs
1//! Slotmap key types for graph nodes, edges, subgraphs, and loops.
2//!
3//! These are separated so they can be used without pulling in heavy codegen
4//! dependencies (syn, proc-macro2, quote, etc.).
5
6use slotmap::new_key_type;
7
8new_key_type! {
9 /// ID to identify a node (operator or handoff) in `DfirGraph`.
10 pub struct GraphNodeId;
11
12 /// ID to identify an edge.
13 pub struct GraphEdgeId;
14
15 /// ID to identify a subgraph in `DfirGraph`.
16 pub struct GraphSubgraphId;
17
18 /// ID to identify a loop block in `DfirGraph`.
19 pub struct GraphLoopId;
20}