pub struct DependencyDetail {Show 14 fields
pub version: 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 package: Option<String>,
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.
registry: Option<String>
Fetch this dependency from a custom 3rd party registry (alias defined in Cargo config), not crates-io.
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: bool
If true, the dependency has been defined at the workspace level, so the path
is joined with workspace’s base path.
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. default
is handled in a special way.
optional: bool
NB: 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: bool
Enable the default
set of features of the dependency (enabled by default).
package: Option<String>
Use this crate name instead of table key.
By using this, a crate can have multiple versions of the same dependency.
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