Struct crates_index_diff::Dependency
source · pub struct Dependency {
pub name: SmolString,
pub required_version: SmolString,
pub features: Vec<String>,
pub optional: bool,
pub default_features: bool,
pub target: Option<SmolString>,
pub kind: Option<DependencyKind>,
pub package: Option<SmolString>,
}
Expand description
A single dependency of a specific crate version
Fields§
§name: SmolString
The crate name
required_version: SmolString
The version the parent crate requires of this dependency
features: Vec<String>
All cargo features configured by the parent crate
optional: bool
True if this is an optional dependency
default_features: bool
True if default features are enabled
target: Option<SmolString>
The name of the build target
kind: Option<DependencyKind>
The kind of dependency, usually ‘normal’ or ‘dev’
package: Option<SmolString>
The package this crate is contained in
Trait Implementations§
source§impl Clone for Dependency
impl Clone for Dependency
source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Dependency
impl Debug for Dependency
source§impl<'de> Deserialize<'de> for Dependency
impl<'de> Deserialize<'de> for Dependency
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for Dependency
impl Hash for Dependency
source§impl Ord for Dependency
impl Ord for Dependency
source§fn cmp(&self, other: &Dependency) -> Ordering
fn cmp(&self, other: &Dependency) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<Dependency> for Dependency
impl PartialEq<Dependency> for Dependency
source§fn eq(&self, other: &Dependency) -> bool
fn eq(&self, other: &Dependency) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Dependency> for Dependency
impl PartialOrd<Dependency> for Dependency
source§fn partial_cmp(&self, other: &Dependency) -> Option<Ordering>
fn partial_cmp(&self, other: &Dependency) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more