pub struct PackageLink<'g> { /* private fields */ }
Expand description

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

Returns the package which depends on the to package.

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

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

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

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

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.

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

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

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

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

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

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.