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

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 Encodable for Dependency

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

Derived Implementations

impl Debug for Dependency

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Dependency

fn clone(&self) -> Dependency

1.0.0fn clone_from(&mut self, source: &Self)

impl PartialEq for Dependency

fn eq(&self, __arg_0: &Dependency) -> bool

fn ne(&self, __arg_0: &Dependency) -> bool