Struct guppy::graph::PackageLink[][src]

pub struct PackageLink<'g> { /* fields omitted */ }

Represents a dependency from one package to another.

This struct contains information about:

  • whether this dependency was renamed in the context of this crate.
  • if this is a normal, dev and/or build dependency.
  • platform-specific information about required, optional and status

Implementations

impl<'g> PackageLink<'g>[src]

pub fn from(&self) -> PackageMetadata<'g>[src]

Returns the package which depends on the to package.

pub fn to(&self) -> PackageMetadata<'g>[src]

Returns the package which is depended on by the from package.

pub fn endpoints(&self) -> (PackageMetadata<'g>, PackageMetadata<'g>)[src]

Returns the endpoints as a pair of packages (from, to).

pub fn dep_name(&self) -> &'g str[src]

Returns the name for this dependency edge. This can be affected by a crate rename.

pub fn resolved_name(&self) -> &'g str[src]

Returns the resolved name for this dependency edge. This may involve renaming the crate and replacing - with _.

pub fn version_req(&self) -> &'g 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, possibly with different version requirements, even if they all end up resolving to the same version. version_req will return any of those requirements.

See Specifying Dependencies in the Cargo reference for more details.

pub fn normal(&self) -> DependencyReq<'g>[src]

Returns details about this dependency from the [dependencies] section.

pub fn build(&self) -> DependencyReq<'g>[src]

Returns details about this dependency from the [build-dependencies] section.

pub fn dev(&self) -> DependencyReq<'g>[src]

Returns details about this dependency from the [dev-dependencies] section.

pub fn req_for_kind(&self, kind: DependencyKind) -> DependencyReq<'g>[src]

Returns details about this dependency from the section specified by the given dependency kind.

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

Return true if this edge is dev-only, i.e. code from this edge will not be included in normal builds.

Trait Implementations

impl<'g> Clone for PackageLink<'g>[src]

impl<'g> Copy for PackageLink<'g>[src]

impl<'g> Debug for PackageLink<'g>[src]

Auto Trait Implementations

impl<'g> RefUnwindSafe for PackageLink<'g>

impl<'g> Send for PackageLink<'g>

impl<'g> Sync for PackageLink<'g>

impl<'g> Unpin for PackageLink<'g>

impl<'g> UnwindSafe for PackageLink<'g>

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<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync
[src]

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

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

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SafeBorrow<T> for T where
    T: ?Sized
[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>,