[][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 DependencyEdge.

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 DependencyLink 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.

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

Returns true if the default features of this dependency are enabled.

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

Returns a list of the features enabled by this dependency.

pub fn target(&self) -> Option<&str>[src]

Returns the target string for this dependency, if specified. This is a string like cfg(target_arch = "x86_64").

See Platform specific dependencies in the Cargo reference for more details.

Trait Implementations

impl Clone for DependencyMetadata[src]

impl Debug for DependencyMetadata[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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