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

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

A set of resolved packages in a package graph.

Created by PackageQuery::resolve.

Methods

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) -> Option<bool>[src]

Returns true if this package ID is contained in this resolve set, false if it isn't, and None if the package ID wasn't found.

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 into_ids(self, direction: DependencyDirection) -> IntoIds<'g>[src]

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

Cycles

The packages within a dependency cycle will be returned in arbitrary order, but overall topological order will be maintained.

pub fn into_metadatas(self, direction: DependencyDirection) -> IntoMetadatas<'g>[src]

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

Cycles

The packages within a dependency cycle will be returned in arbitrary order, but overall topological order will be maintained.

pub fn into_root_ids(
    self,
    direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'g
[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 arbitrary order.

pub fn into_root_metadatas(
    self,
    direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageMetadata> + ExactSizeIterator + 'g
[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 arbitrary order.

Creates an iterator over dependency links.

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 may be returned in arbitrary order.

pub fn into_dot<V: PackageDotVisitor + 'g>(
    self,
    visitor: V
) -> impl Display + 'g
[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]

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<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<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<V, T> VZip<V> for T where
    V: MultiLane<T>,