pub struct IndexDependency {
    pub name: String,
    pub req: VersionReq,
    pub features: Vec<String>,
    pub optional: bool,
    pub default_features: bool,
    pub target: Option<String>,
    pub kind: DependencyKind,
    pub registry: Option<Url>,
    pub package: Option<String>,
    /* private fields */
}
Expand description

A dependency of a package.

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: VersionReq

The semver requirement for this dependency.

features: Vec<String>

List of features enabled for this dependency.

optional: bool

Whether or not this is an optional dependency.

default_features: bool

Whether or not default features are enabled.

target: Option<String>

The target platform for the dependency.

kind: DependencyKind

The dependency kind.

registry: Option<Url>

The URL of the index of the registry where this dependency is from.

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 None, this dependency is not renamed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.