]> git.lizzy.rs Git - rust.git/blob - src/cargo.rs
travis should check `clippy-lints`
[rust.git] / src / cargo.rs
1 use std::collections::HashMap;
2
3 #[derive(RustcDecodable, Debug)]
4 pub struct Metadata {
5     pub packages: Vec<Package>,
6     resolve: Option<()>,
7     pub version: usize,
8 }
9
10 #[derive(RustcDecodable, Debug)]
11 pub struct Package {
12     name: String,
13     version: String,
14     id: String,
15     source: Option<()>,
16     dependencies: Vec<Dependency>,
17     pub targets: Vec<Target>,
18     features: HashMap<String, Vec<String>>,
19     manifest_path: String,
20 }
21
22 #[derive(RustcDecodable, Debug)]
23 pub struct Dependency {
24     name: String,
25     source: Option<String>,
26     req: String,
27     kind: Option<String>,
28     optional: bool,
29     uses_default_features: bool,
30     features: Vec<HashMap<String, String>>,
31     target: Option<()>,
32 }
33
34 #[allow(non_camel_case_types)]
35 #[derive(RustcDecodable, Debug)]
36 pub enum Kind {
37     dylib,
38     test,
39     bin,
40     lib,
41 }
42
43 #[derive(RustcDecodable, Debug)]
44 pub struct Target {
45     pub name: String,
46     pub kind: Vec<Kind>,
47     src_path: String,
48 }