Struct cargo::core::dependency::Dependency
[−]
[src]
pub struct Dependency { // some fields omitted }
Information about a dependency requested by a Cargo manifest. Cheap to copy.
Methods
impl Dependency
[src]
fn parse(name: &str, version: Option<&str>, source_id: &SourceId) -> CargoResult<Dependency>
Attempt to create a Dependency
from an entry in the manifest.
fn new_override(name: &str, source_id: &SourceId) -> Dependency
fn clone_inner(&self) -> DependencyInner
fn version_req(&self) -> &VersionReq
fn name(&self) -> &str
fn source_id(&self) -> &SourceId
fn kind(&self) -> Kind
fn specified_req(&self) -> Option<&str>
fn platform(&self) -> Option<&Platform>
If none, this dependencies must be built for all platforms. If some, it must only be built for the specified platform.
fn lock_to(self, id: &PackageId) -> Dependency
Lock this dependency to depending on the specified package id
fn is_transitive(&self) -> bool
Returns false if the dependency is only used to build the local package.
fn is_build(&self) -> bool
fn is_optional(&self) -> bool
fn uses_default_features(&self) -> bool
Returns true if the default features of the dependency are requested.
fn features(&self) -> &[String]
Returns the list of features that are requested by the dependency.
fn matches(&self, sum: &Summary) -> bool
Returns true if the package (sum
) can fulfill this dependency request.
fn matches_id(&self, id: &PackageId) -> bool
Returns true if the package (id
) can fulfill this dependency request.
Trait Implementations
impl Debug for Dependency
[src]
impl Clone for Dependency
[src]
fn clone(&self) -> Dependency
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Dependency
[src]
fn eq(&self, __arg_0: &Dependency) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Dependency) -> bool
This method tests for !=
.