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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use toml::value::Value;
#[derive(Debug, Deserialize)]
pub struct Author {
pub name: String,
pub email: String,
pub github_username: Option<String>,
pub reco_developer: Option<bool>,
}
#[derive(Debug, Deserialize)]
pub struct Config {
pub version_control: Option<String>,
pub author: Option<Author>,
pub license: Option<String>,
pub user: Option<UserConfig>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct Directory {
pub files: Option<Vec<String>>,
pub directories: Option<Vec<String>>,
pub templates: Option<Vec<String>>,
pub scripts: Option<Vec<String>>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct ProjectConfig {
pub version_control: Option<String>,
pub version: Option<String>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct Project {
pub license: Option<String>,
pub with_readme: Option<bool>,
pub files: Directory,
pub config: Option<ProjectConfig>,
pub user: Option<UserConfig>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct UserConfig {
pub toml: Value,
}