pub struct DependencyDetail {Show 14 fields
pub version: Option<String>,
pub package: Option<String>,
pub registry: Option<String>,
pub registry_index: Option<String>,
pub path: Option<String>,
pub inherited: bool,
pub git: Option<String>,
pub branch: Option<String>,
pub tag: Option<String>,
pub rev: Option<String>,
pub features: Vec<String>,
pub optional: bool,
pub default_features: bool,
pub unstable: BTreeMap<String, Value>,
}Expand description
When definition of a dependency is more than just a version string.
Fields§
§version: Option<String>Semver requirement. Note that a plain version number implies this version or newer compatible one.
package: Option<String>If Some, use this as the crate name instead of [dependencies]’s table key.
By using this, a crate can have multiple versions of the same dependency.
registry: Option<String>Fetch this dependency from a custom 3rd party registry (alias defined in Cargo config), not crates-io.
This depends on local cargo configuration. It becomes registry_index after the crate is uploaded to a registry.
registry_index: Option<String>Directly define custom 3rd party registry URL (may be sparse+https:) instead of a config nickname.
path: Option<String>This path is usually relative to the crate’s manifest, but when using workspace inheritance, it may be relative to the workspace!
When calling Manifest::complete_from_path_and_workspace use absolute path for the workspace manifest, and then this will be corrected to be an absolute
path when inherited from the workspace.
inherited: boolIf true, the dependency has been defined at the workspace level, so the path is joined with workspace’s base path.
This is a field added by this crate, does not exist in TOML.
Note that Dependency::Simple won’t have this flag, even if it was inherited.
git: Option<String>Read dependency from git repo URL, not allowed on crates-io.
branch: Option<String>Read dependency from git branch, not allowed on crates-io.
tag: Option<String>Read dependency from git tag, not allowed on crates-io.
rev: Option<String>Read dependency from git commit, not allowed on crates-io.
features: Vec<String>Enable these features of the dependency.
Note that Cargo interprets default in a special way.
optional: boolNB: Not allowed at workspace level
If not used with dep: or ?/ syntax in [features], this also creates an implicit feature.
See the [features] module for more info.
default_features: boolEnable the default set of features of the dependency (enabled by default).
unstable: BTreeMap<String, Value>Contains the remaining unstable keys and values for the dependency.
Trait Implementations§
Source§impl Clone for DependencyDetail
impl Clone for DependencyDetail
Source§fn clone(&self) -> DependencyDetail
fn clone(&self) -> DependencyDetail
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more