pub struct BinaryPackageAlternativesResolution<'file, 'data: 'file> {
pub alternatives: Vec<BinaryPackageSingleDependencyResolution<'file, 'data>>,
}Expand description
A collection of BinaryPackageSingleDependencyResolution satisfying a set of alternative expressions.
Fields§
§alternatives: Vec<BinaryPackageSingleDependencyResolution<'file, 'data>>Implementations§
Source§impl<'file, 'data: 'file> BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data: 'file> BinaryPackageAlternativesResolution<'file, 'data>
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether no packages satisfy constraints from this list of dependency expressions.
Returns true if the set of dependency expressions is empty or if all expressions have empty packages lists.
Sourcepub fn alternative_constraints(&self) -> impl Iterator<Item = &SingleDependency>
pub fn alternative_constraints(&self) -> impl Iterator<Item = &SingleDependency>
Obtain alternative dependency constraints for this set.
Sourcepub fn packages(
&self,
) -> impl Iterator<Item = &'file BinaryPackageControlFile<'data>> + '_
pub fn packages( &self, ) -> impl Iterator<Item = &'file BinaryPackageControlFile<'data>> + '_
Iterate over all packages in this set of alternatives.
There may be duplicates in the output stream.
Sourcepub fn packages_with_expression(
&self,
) -> impl Iterator<Item = (&SingleDependency, &'file BinaryPackageControlFile<'data>)> + '_
pub fn packages_with_expression( &self, ) -> impl Iterator<Item = (&SingleDependency, &'file BinaryPackageControlFile<'data>)> + '_
Iterate over packages while also emitting the expression being satisfied.
Sourcepub fn prune_empty(&mut self)
pub fn prune_empty(&mut self)
Prune empty alternatives from this data structure.
Dependency expressions not having any satisfying packages will be removed.
Trait Implementations§
Source§impl<'file, 'data: 'file> Clone for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data: 'file> Clone for BinaryPackageAlternativesResolution<'file, 'data>
Source§fn clone(&self) -> BinaryPackageAlternativesResolution<'file, 'data>
fn clone(&self) -> BinaryPackageAlternativesResolution<'file, 'data>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'file, 'data: 'file> Debug for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data: 'file> Debug for BinaryPackageAlternativesResolution<'file, 'data>
Source§impl<'file, 'data: 'file> Default for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data: 'file> Default for BinaryPackageAlternativesResolution<'file, 'data>
Source§fn default() -> BinaryPackageAlternativesResolution<'file, 'data>
fn default() -> BinaryPackageAlternativesResolution<'file, 'data>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'file, 'data> Freeze for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data> RefUnwindSafe for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data> Send for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data> Sync for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data> Unpin for BinaryPackageAlternativesResolution<'file, 'data>
impl<'file, 'data> UnwindSafe for BinaryPackageAlternativesResolution<'file, 'data>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more