Document project_model::PackageData
This adds a description for `PackageData` and all its fields.
This commit is contained in:
parent
7c3e163e90
commit
0abe487f1c
@ -80,19 +80,35 @@ pub struct CargoConfig {
|
|||||||
|
|
||||||
pub type Target = Idx<TargetData>;
|
pub type Target = Idx<TargetData>;
|
||||||
|
|
||||||
|
/// Information associated with a cargo crate
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub struct PackageData {
|
pub struct PackageData {
|
||||||
|
/// Version given in the `Cargo.toml`
|
||||||
pub version: String,
|
pub version: String,
|
||||||
|
/// Name as given in the `Cargo.toml`
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
/// Path containing the `Cargo.toml`
|
||||||
pub manifest: AbsPathBuf,
|
pub manifest: AbsPathBuf,
|
||||||
|
/// Targets provided by the crate (lib, bin, example, test, ...)
|
||||||
pub targets: Vec<Target>,
|
pub targets: Vec<Target>,
|
||||||
|
/// Is this package a member of the current workspace
|
||||||
pub is_member: bool,
|
pub is_member: bool,
|
||||||
|
/// List of packages this package depends on
|
||||||
pub dependencies: Vec<PackageDependency>,
|
pub dependencies: Vec<PackageDependency>,
|
||||||
|
/// Rust edition for this package
|
||||||
pub edition: Edition,
|
pub edition: Edition,
|
||||||
|
/// List of features to activate
|
||||||
pub features: Vec<String>,
|
pub features: Vec<String>,
|
||||||
|
/// List of config flags defined by this package's build script
|
||||||
pub cfgs: Vec<CfgFlag>,
|
pub cfgs: Vec<CfgFlag>,
|
||||||
|
/// List of cargo-related environment variables with their value
|
||||||
|
///
|
||||||
|
/// If the package has a build script which defines environment variables,
|
||||||
|
/// they can also be found here.
|
||||||
pub envs: Vec<(String, String)>,
|
pub envs: Vec<(String, String)>,
|
||||||
|
/// Directory where a build script might place its output
|
||||||
pub out_dir: Option<AbsPathBuf>,
|
pub out_dir: Option<AbsPathBuf>,
|
||||||
|
/// Path to the proc-macro library file if this package exposes proc-macros
|
||||||
pub proc_macro_dylib_path: Option<AbsPathBuf>,
|
pub proc_macro_dylib_path: Option<AbsPathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user