diff options
author | Arnaud <[email protected]> | 2021-01-06 15:39:44 +0000 |
---|---|---|
committer | Arnaud <[email protected]> | 2021-01-06 16:26:21 +0000 |
commit | ef636ba346582db196cd52a694ac9fe71fc36019 (patch) | |
tree | e416a995c20b523a95d57a0febfa7d255abdfe5c /crates | |
parent | 0abe487f1cf5d31c4d6b44961cd8b3e8fe49ed30 (diff) |
Document `project_model::TargetData`
This adds a description for `TargetData` and all its fields.
Diffstat (limited to 'crates')
-rw-r--r-- | crates/project_model/src/cargo_workspace.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs index 006c66ae7..0e6679542 100644 --- a/crates/project_model/src/cargo_workspace.rs +++ b/crates/project_model/src/cargo_workspace.rs | |||
@@ -118,12 +118,18 @@ pub struct PackageDependency { | |||
118 | pub name: String, | 118 | pub name: String, |
119 | } | 119 | } |
120 | 120 | ||
121 | /// Information associated with a package's target | ||
121 | #[derive(Debug, Clone, Eq, PartialEq)] | 122 | #[derive(Debug, Clone, Eq, PartialEq)] |
122 | pub struct TargetData { | 123 | pub struct TargetData { |
124 | /// Package that provided this target | ||
123 | pub package: Package, | 125 | pub package: Package, |
126 | /// Name as given in the `Cargo.toml` or generated from the file name | ||
124 | pub name: String, | 127 | pub name: String, |
128 | /// Path to the main source file of the target | ||
125 | pub root: AbsPathBuf, | 129 | pub root: AbsPathBuf, |
130 | /// Kind of target | ||
126 | pub kind: TargetKind, | 131 | pub kind: TargetKind, |
132 | /// Is this target a proc-macro | ||
127 | pub is_proc_macro: bool, | 133 | pub is_proc_macro: bool, |
128 | } | 134 | } |
129 | 135 | ||