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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
use std::borrow;
use std::path;
pub mod diagnostic;
type CowPath<'a> = borrow::Cow<'a, path::Path>;
type CowStr<'a> = borrow::Cow<'a, str>;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "reason", rename_all = "kebab-case")]
pub enum Message<'a> {
#[serde(borrow)]
CompilerArtifact(Artifact<'a>),
#[serde(borrow)]
CompilerMessage(FromCompiler<'a>),
#[serde(borrow)]
BuildScriptExecuted(BuildScript<'a>),
#[cfg(not(feature = "strict_unstable"))]
#[doc(hidden)]
#[serde(other)]
Unknown,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
pub struct Artifact<'a> {
#[serde(borrow)]
pub package_id: WorkspaceMember<'a>,
#[serde(borrow)]
pub target: Target<'a>,
#[serde(borrow)]
pub profile: ArtifactProfile<'a>,
#[serde(borrow)]
pub features: Vec<CowStr<'a>>,
#[serde(borrow)]
pub filenames: Vec<CowPath<'a>>,
pub fresh: bool,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}
#[derive(Clone, Serialize, Deserialize, Debug)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
pub struct Target<'a> {
#[serde(borrow)]
pub name: CowStr<'a>,
#[serde(borrow)]
pub kind: Vec<CowStr<'a>>,
#[serde(default)]
#[serde(borrow)]
pub crate_types: Vec<CowStr<'a>>,
#[serde(default)]
#[serde(rename = "required-features")]
#[serde(borrow)]
pub required_features: Vec<CowStr<'a>>,
#[serde(borrow)]
pub src_path: CowPath<'a>,
#[serde(default = "edition_default")]
#[serde(borrow)]
pub edition: CowStr<'a>,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}
fn edition_default() -> CowStr<'static> {
"2015".into()
}
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
#[serde(transparent)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
pub struct WorkspaceMember<'a> {
#[serde(borrow)]
raw: CowStr<'a>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
pub struct ArtifactProfile<'a> {
#[serde(borrow)]
pub opt_level: CowStr<'a>,
pub debuginfo: Option<u32>,
pub debug_assertions: bool,
pub overflow_checks: bool,
pub test: bool,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
pub struct FromCompiler<'a> {
#[serde(borrow)]
pub package_id: WorkspaceMember<'a>,
#[serde(borrow)]
pub target: Target<'a>,
#[serde(borrow)]
pub message: diagnostic::Diagnostic<'a>,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "strict_unstable", serde(deny_unknown_fields))]
pub struct BuildScript<'a> {
#[serde(borrow)]
pub package_id: WorkspaceMember<'a>,
#[serde(borrow)]
pub linked_libs: Vec<CowStr<'a>>,
#[serde(borrow)]
pub linked_paths: Vec<CowPath<'a>>,
#[serde(borrow)]
pub cfgs: Vec<CowPath<'a>>,
#[serde(borrow)]
pub env: Vec<(CowStr<'a>, CowStr<'a>)>,
#[doc(hidden)]
#[serde(skip)]
__do_not_match_exhaustively: (),
}