Struct guppy::graph::PackageSet[][src]

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

A set of resolved packages in a package graph.

Created by PackageQuery::resolve.

Implementations

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

pub fn len(&self) -> usize[src]

Returns the number of packages in this set.

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

Returns true if no packages were resolved in this set.

pub fn contains(&self, package_id: &PackageId) -> Result<bool, Error>[src]

Returns true if this package ID is contained in this resolve set.

Returns an error if the package ID is unknown.

pub fn to_package_query(
    &self,
    direction: DependencyDirection
) -> PackageQuery<'g>
[src]

Creates a new PackageQuery from this set in the specified direction.

This is equivalent to constructing a query from all the package_ids.

pub fn union(&self, other: &Self) -> Self[src]

Returns a PackageSet that contains all packages present in at least one of self and other.

Panics

Panics if the package graphs associated with self and other don’t match.

pub fn intersection(&self, other: &Self) -> Self[src]

Returns a PackageSet that contains all packages present in both self and other.

Panics

Panics if the package graphs associated with self and other don’t match.

pub fn difference(&self, other: &Self) -> Self[src]

Returns a PackageSet that contains all packages present in self but not other.

Panics

Panics if the package graphs associated with self and other don’t match.

pub fn symmetric_difference(&self, other: &Self) -> Self[src]

Returns a PackageSet that contains all packages present in exactly one of self and other.

Panics

Panics if the package graphs associated with self and other don’t match.

pub fn to_feature_set(&self, filter: impl FeatureFilter<'g>) -> FeatureSet<'g>[src]

Creates a new FeatureSet consisting of all packages in this PackageSet, using the given feature filter.

This will cause the feature graph to be constructed if it hasn’t been done so already.

pub fn package_ids<'a>(
    &'a self,
    direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
[src]

Iterates over package IDs, in topological order in the direction specified.

Cycles

The packages within a dependency cycle will be returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then Foo is returned before Bar.

pub fn packages<'a>(
    &'a self,
    direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
[src]

Iterates over package metadatas, in topological order in the direction specified.

Cycles

The packages within a dependency cycle will be returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then Foo is returned before Bar.

pub fn root_ids<'a>(
    &'a self,
    direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
[src]

Returns the set of “root package” IDs in the specified direction.

  • If direction is Forward, return the set of packages that do not have any dependencies within the selected graph.
  • If direction is Reverse, return the set of packages that do not have any dependents within the selected graph.

Cycles

If a root consists of a dependency cycle, all the packages in it will be returned in non-dev order (when the direction is forward).

pub fn root_packages<'a>(
    &'a self,
    direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
[src]

Returns the set of “root package” metadatas in the specified direction.

  • If direction is Forward, return the set of packages that do not have any dependencies within the selected graph.
  • If direction is Reverse, return the set of packages that do not have any dependents within the selected graph.

Cycles

If a root consists of a dependency cycle, all the packages in it will be returned in non-dev order (when the direction is forward).

Creates an iterator over PackageLink instances.

If the iteration is in forward order, for any given package, at least one link where the package is on the to end is returned before any links where the package is on the from end.

If the iteration is in reverse order, for any given package, at least one link where the package is on the from end is returned before any links where the package is on the to end.

Cycles

The links in a dependency cycle will be returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then the link Foo -> Bar is returned before the link Bar -> Foo.

pub fn display_dot<'a, V: PackageDotVisitor + 'g>(
    &'a self,
    visitor: V
) -> impl Display + 'a
[src]

Constructs a representation of the selected packages in dot format.

Trait Implementations

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

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

impl<'g> Eq for PackageSet<'g>[src]

impl<'g> PartialEq<PackageSet<'g>> for PackageSet<'g>[src]

Auto Trait Implementations

impl<'g> RefUnwindSafe for PackageSet<'g>

impl<'g> Send for PackageSet<'g>

impl<'g> Sync for PackageSet<'g>

impl<'g> Unpin for PackageSet<'g>

impl<'g> UnwindSafe for PackageSet<'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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[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>,