[][src]Struct guppy::graph::cargo::CargoSet

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

A set of packages and features, as would be built by Cargo.

Cargo implements a set of algorithms to figure out which packages or features are built in a given situation. guppy implements those algorithms.

Implementations

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

pub fn new(query: FeatureQuery<'g>, opts: &CargoOptions) -> Result<Self, Error>[src]

Creates a new CargoSet based on the given query and options.

This is also accessible through FeatureQuery::resolve_cargo(), and it may be more convenient to use that if the code is written in a "fluent" style.

pub fn feature_graph(&self) -> &FeatureGraph<'g>[src]

Returns the feature graph for this CargoSet instance.

pub fn package_graph(&self) -> &'g PackageGraph[src]

Returns the package graph for this CargoSet instance.

pub fn original_query(&self) -> &FeatureQuery<'g>[src]

Returns the original query from which the CargoSet instance was constructed.

pub fn target_features(&self) -> &FeatureSet<'g>[src]

Returns the feature set enabled on the target platform.

This represents the packages and features that are included as code in the final build artifacts. This is relevant for both cross-compilation and auditing.

pub fn host_features(&self) -> &FeatureSet<'g>[src]

Returns the feature set enabled on the host platform.

This represents the packages and features that influence the final build artifacts, but whose code is generally not directly included.

This includes all procedural macros, including those specified in the initial query.

pub fn target_direct_deps(&self) -> &PackageSet<'g>[src]

Returns the set of workspace and direct dependency packages on the target platform.

The packages in this set are a subset of the packages in target_features.

pub fn host_direct_deps(&self) -> &PackageSet<'g>[src]

Returns the set of workspace and direct dependency packages on the host platform.

The packages in this set are a subset of the packages in host_features.

Returns PackageLink instances for procedural macro dependencies from target packages.

Procedural macros straddle the line between target and host: they're built for the host but generate code that is compiled for the target platform.

Notes

Procedural macro packages will be included in the host feature set.

The returned iterator will include proc macros that are depended on normally or in dev builds from initials (if include_dev is set), but not the ones in the [build-dependencies] section.

Returns PackageLink instances for build dependencies from target packages.

Notes

For each link, the from is built on the target while the to is built on the host. It is possible (though rare) that a build dependency is also included as a normal dependency, or as a dev dependency in which case it will also be built on the target.

The returned iterators will not include build dependencies of host packages -- those are also built on the host.

Auto Trait Implementations

impl<'g> RefUnwindSafe for CargoSet<'g>

impl<'g> Send for CargoSet<'g>

impl<'g> Sync for CargoSet<'g>

impl<'g> Unpin for CargoSet<'g>

impl<'g> UnwindSafe for CargoSet<'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<T> From<T> for T[src]

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

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

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>,