pub struct Dependency {
pub name: String,
pub source: Option<String>,
pub req: VersionReq,
pub kind: DependencyKind,
pub optional: bool,
pub uses_default_features: bool,
pub features: Vec<String>,
pub target: Option<Platform>,
pub rename: Option<String>,
pub registry: Option<String>,
// some fields omitted
}
A dependency of the main crate
Name as given in the Cargo.toml
The kind of dependency this is
Whether this dependency is required or optional
Whether the default features in this dependency are used.
The list of features enabled for this dependency.
The target this dependency is specific to.
Use the Display
trait to access the contents.
If the dependency is renamed, this is the new name for the dependency
as a string. None if it is not renamed.
The URL of the index of the registry where this dependency is from.
If None, the dependency is from crates.io.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static