1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pub mod html;
pub mod sys;

use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct Module {
    pub name: String,
    pub description: String,
}

/// Map modules to the MDN hierarchy
#[derive(Debug, Serialize, Deserialize)]
pub struct ModuleMapping {
    pub name: String,
    pub children: Vec<String>,
}

/// A generated code file, returned so it can be written to disk.
#[derive(Debug)]
pub struct CodeFile {
    pub filename: String,
    pub dir: String,
    pub code: String,
}