From ef636ba346582db196cd52a694ac9fe71fc36019 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 6 Jan 2021 16:39:44 +0100 Subject: Document `project_model::TargetData` This adds a description for `TargetData` and all its fields. --- crates/project_model/src/cargo_workspace.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates') 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 { pub name: String, } +/// Information associated with a package's target #[derive(Debug, Clone, Eq, PartialEq)] pub struct TargetData { + /// Package that provided this target pub package: Package, + /// Name as given in the `Cargo.toml` or generated from the file name pub name: String, + /// Path to the main source file of the target pub root: AbsPathBuf, + /// Kind of target pub kind: TargetKind, + /// Is this target a proc-macro pub is_proc_macro: bool, } -- cgit v1.2.3