1pub mod ser;
18
19use meshed::graph::GraphDefinition;
20use webpack_stats::chunk::{
21 ChunkChild, ChunkChildren, ChunkId, ChunkInitial, ChunkModules, ChunkParentOrSibling, Files,
22};
23use webpack_stats::import::{ImportType, ResolvedModule};
24use webpack_stats::module::{ModuleChunks, ModuleIdentifier, ModuleName};
25use webpack_stats::SizeBytes;
26
27pub struct ModuleParentGraph;
28
29impl GraphDefinition for ModuleParentGraph {
30 type Id = ModuleIdentifier;
31 type Label = ModuleName;
32 type EdgeMeta = (ImportType, ResolvedModule);
33 type NodeData = ModuleChunks;
34}
35
36pub struct ChunkGraph;
37
38impl GraphDefinition for ChunkGraph {
39 type Id = ChunkId;
40 type Label = ChunkId;
41 type EdgeMeta = ChunkChild;
42 type NodeData = ChunkModules;
43}
44pub struct ChunkImportPathGraph;
45
46impl GraphDefinition for ChunkImportPathGraph {
47 type Id = ChunkId;
48 type Label = ChunkId;
49 type EdgeMeta = ChunkParentOrSibling;
50 type NodeData = ();
51}
52
53pub struct ChunkLoadGraph;
54
55impl GraphDefinition for ChunkLoadGraph {
56 type Id = ChunkId;
57 type Label = ChunkId;
58 type EdgeMeta = ChunkChild;
59 type NodeData = (ChunkChildren, SizeBytes, ChunkInitial, Files);
60}