[][src]Struct guppy::graph::DependencyMetadata

pub struct DependencyMetadata { /* fields omitted */ }

Information about a specific kind of dependency (normal, build or dev) from a package to another package.

Usually found within the context of a PackageEdge.

Methods

impl DependencyMetadata[src]

pub fn version_req(&self) -> &VersionReq[src]

Returns the semver requirements specified for this dependency.

To get the resolved version, see the to field of the PackageLink this was part of.

Notes

A dependency can be requested multiple times in the normal, build and dev fields, possibly with different version requirements, even if they all end up resolving to the same version.

See Specifying Dependencies in the Cargo reference for more details.

pub fn optional(&self) -> bool[src]

Returns true if this is an optional dependency on the platform guppy is running on.

This will also return true if this dependency will never be included on this platform at all, or if the status is unknown. To get finer-grained information, use the enabled method instead.

pub fn optional_on(&self, platform: &Platform) -> bool[src]

Returns true if this is an optional dependency on the given platform.

This will also return true if this dependency will never be included on this platform at all, or if the status is unknown. To get finer-grained information, use the enabled_on method instead.

pub fn enabled(&self) -> EnabledStatus[src]

Returns the enabled status of this dependency on the platform guppy is running on.

See the documentation for EnabledStatus for more.

pub fn enabled_on(&self, platform: &Platform) -> EnabledStatus[src]

Returns the enabled status of this dependency on the given platform.

See the documentation for EnabledStatus for more.

pub fn uses_default_features(&self) -> bool[src]

Returns true if the default features of this dependency are enabled on the platform guppy is running on.

It is possible for default features to be turned off by default, but be optionally included. This method returns true in those cases. To get finer-grained information, use the default_features method instead.

pub fn default_features(&self) -> EnabledStatus[src]

Returns the status of default features on the platform guppy is running on.

See the documentation for EnabledStatus for more.

pub fn default_features_on(&self, platform: &Platform) -> EnabledStatus[src]

Returns the status of default features of this dependency on the given platform.

See the documentation for EnabledStatus for more.

pub fn features(&self) -> &[String][src]

Returns a list of all features possibly enabled by this dependency. This includes features that are only turned on if the dependency is optional, or features enabled by inactive platforms.

pub fn feature_enabled(&self, feature: &str) -> EnabledStatus[src]

Returns the enabled status of the feature on the platform guppy is running on.

Note that as of Rust 1.42, the default feature resolver behaves in potentially surprising ways. See the Cargo reference for more.

See the documentation for EnabledStatus for more.

pub fn feature_enabled_on(
    &self,
    feature: &str,
    platform: &Platform
) -> EnabledStatus
[src]

Returns the enabled status of the feature on the given platform.

See the documentation of EnabledStatus for more.

Trait Implementations

impl Clone for DependencyMetadata[src]

impl Debug for DependencyMetadata[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,