pub(crate) struct DependencyMetadata {
pub(crate) name: String,
pub(crate) req: String,
pub(crate) features: Vec<String>,
pub(crate) optional: bool,
pub(crate) default_features: bool,
pub(crate) target: Option<String>,
pub(crate) kind: DepKind,
pub(crate) registry: Option<String>,
pub(crate) package: Option<String>,
}
Fields§
§name: String
Name of the dependency.
If the dependency is renamed from the original package name,
this is the new name. The original package name is stored in
the package
field.
req: String
The semver requirement for this dependency. This must be a valid version requirement defined at https://github.com/steveklabnik/semver#requirements.
features: Vec<String>
Array of features (as strings) enabled for this dependency.
optional: bool
Boolean of whether or not this is an optional dependency.
default_features: bool
Boolean of whether or not default features are enabled.
target: Option<String>
The target platform for the dependency. null if not a target dependency. Otherwise, a string such as “cfg(windows)”.
kind: DepKind
The dependency kind.
“dev”, “build”, or “normal”.
Note: this is a required field, but a small number of entries
exist in the crates.io index with either a missing or null
kind
field due to implementation bugs.
registry: Option<String>
The URL of the index of the registry where this dependency is from as a string. If not specified or null, it is assumed the dependency is in the current registry.
package: Option<String>
If the dependency is renamed, this is a string of the actual package name. If not specified or null, this dependency is not renamed.
Trait Implementations§
source§impl Clone for DependencyMetadata
impl Clone for DependencyMetadata
source§fn clone(&self) -> DependencyMetadata
fn clone(&self) -> DependencyMetadata
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DependencyMetadata
impl Debug for DependencyMetadata
source§impl<'de> Deserialize<'de> for DependencyMetadata
impl<'de> Deserialize<'de> for DependencyMetadata
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 Hash for DependencyMetadata
impl Hash for DependencyMetadata
source§impl Ord for DependencyMetadata
impl Ord for DependencyMetadata
source§fn cmp(&self, other: &DependencyMetadata) -> Ordering
fn cmp(&self, other: &DependencyMetadata) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<DependencyMetadata> for DependencyMetadata
impl PartialEq<DependencyMetadata> for DependencyMetadata
source§fn eq(&self, other: &DependencyMetadata) -> bool
fn eq(&self, other: &DependencyMetadata) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DependencyMetadata> for DependencyMetadata
impl PartialOrd<DependencyMetadata> for DependencyMetadata
source§fn partial_cmp(&self, other: &DependencyMetadata) -> Option<Ordering>
fn partial_cmp(&self, other: &DependencyMetadata) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more