[−][src]Struct guppy::graph::PackageSet
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 None
if the package ID is unknown.
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 package_ids<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
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 packages<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
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 root_ids<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = &'g PackageId> + ExactSizeIterator + 'a
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 root_packages<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageMetadata<'g>> + ExactSizeIterator + 'a
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.
pub fn links<'a>(
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageLink<'g>> + 'a
[src]
&'a self,
direction: DependencyDirection
) -> impl Iterator<Item = PackageLink<'g>> + 'a
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 may be returned in arbitrary order.
pub fn display_dot<'a, V: PackageDotVisitor + 'g>(
&'a self,
visitor: V
) -> impl Display + 'a
[src]
&'a self,
visitor: V
) -> impl Display + 'a
Constructs a representation of the selected packages in dot
format.
Trait Implementations
impl<'g> Clone for PackageSet<'g>
[src]
fn clone(&self) -> PackageSet<'g>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
[src]
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
[src]
fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
[src]
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
[src]
fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> SafeBorrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,