Struct cargo_toml::DependencyDetail
source · 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 moresource§impl Debug for DependencyDetail
impl Debug for DependencyDetail
source§impl Default for DependencyDetail
impl Default for DependencyDetail
source§impl<'de> Deserialize<'de> for DependencyDetail
impl<'de> Deserialize<'de> for DependencyDetail
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for DependencyDetail
impl PartialEq for DependencyDetail
source§impl Serialize for DependencyDetail
impl Serialize for DependencyDetail
impl StructuralPartialEq for DependencyDetail
Auto Trait Implementations§
impl Freeze for DependencyDetail
impl RefUnwindSafe for DependencyDetail
impl Send for DependencyDetail
impl Sync for DependencyDetail
impl Unpin for DependencyDetail
impl UnwindSafe for DependencyDetail
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)