MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / load

Method load

build.rs:196–243  ·  view source on GitHub ↗
(build_path: &Path)

Source from the content-addressed store, hash-verified

194 } else if path.extension().and_then(|ext| ext.to_str()) == Some("build") {
195 out.push(path);
196 }
197 }
198}
199
200#[derive(Clone, Copy, PartialEq, Eq)]
201enum Kind {
202 Tool,
203 Demo,
204 Example,
205 Fixture,
206}
207
208impl Kind {
209 fn parse(value: &str) -> Self {
210 match value {
211 "tool" => Self::Tool,
212 "demo" => Self::Demo,
213 "example" => Self::Example,
214 "fixture" => Self::Fixture,
215 other => panic!("unknown program kind `{other}`"),
216 }
217 }
218
219 fn variant(self) -> &'static str {
220 match self {
221 Self::Tool => "Tool",
222 Self::Demo => "Demo",
223 Self::Example => "Example",
224 Self::Fixture => "Fixture",
225 }
226 }
227
228 fn rank(self) -> u8 {
229 self as u8
230 }
231}
232
233struct Program {
234 name: String,
235 title: String,
236 description: String,
237 kind: Kind,
238 install_path: Option<String>,
239 source: String,
240 build_path: String,
241 import_closure: bool,
242 mangle_symbols: bool,
243 layout_const: Option<String>,
244 layout_path: Option<String>,
245}
246

Callers

nothing calls this directly

Calls 7

fieldFunction · 0.85
absFunction · 0.85
stringMethod · 0.80
boolMethod · 0.80
getMethod · 0.80
displayMethod · 0.80
parseFunction · 0.50

Tested by

no test coverage detected