Struct cargo::core::dependency::DependencyInner
[−]
[src]
pub struct DependencyInner { // some fields omitted }
The data underlying a Dependency.
Methods
impl DependencyInner
[src]
fn parse(name: &str, version: Option<&str>, source_id: &SourceId) -> CargoResult<DependencyInner>
Attempt to create a Dependency
from an entry in the manifest.
fn new_override(name: &str, source_id: &SourceId) -> 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 dependency must be built for all platforms. If some, it must only be built for matching platforms.
fn set_kind(self, kind: Kind) -> DependencyInner
fn set_features(self, features: Vec<String>) -> DependencyInner
Sets the list of features requested for the package.
fn set_default_features(self, default_features: bool) -> DependencyInner
Sets whether the dependency requests default features of the package.
fn set_optional(self, optional: bool) -> DependencyInner
Sets whether the dependency is optional.
fn set_source_id(self, id: SourceId) -> DependencyInner
Set the source id for this dependency
fn set_version_req(self, req: VersionReq) -> DependencyInner
Set the version requirement for this dependency
fn set_platform(self, platform: Option<Platform>) -> DependencyInner
fn lock_to(self, id: &PackageId) -> DependencyInner
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.
fn into_dependency(self) -> Dependency
Trait Implementations
Derived Implementations
impl Debug for DependencyInner
[src]
impl Clone for DependencyInner
[src]
fn clone(&self) -> DependencyInner
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 DependencyInner
[src]
fn eq(&self, __arg_0: &DependencyInner) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DependencyInner) -> bool
This method tests for !=
.