pub struct Conflicts(/* private fields */);Expand description
A list of conflicting sets of extras/groups pre-defined by an end user.
This is useful to force the resolver to fork according to extras that have unavoidable conflicts with each other. (The alternative is that resolution will fail.)
Implementations§
Source§impl Conflicts
impl Conflicts
Sourcepub fn push(&mut self, set: ConflictSet)
pub fn push(&mut self, set: ConflictSet)
Push a single set of conflicts.
Sourcepub fn iter(&self) -> impl Iterator<Item = &ConflictSet> + Clone + '_
pub fn iter(&self) -> impl Iterator<Item = &ConflictSet> + Clone + '_
Returns an iterator over all sets of conflicting sets.
Sourcepub fn contains<'a>(
&self,
package: &PackageName,
kind: impl Into<ConflictKindRef<'a>>,
) -> bool
pub fn contains<'a>( &self, package: &PackageName, kind: impl Into<ConflictKindRef<'a>>, ) -> bool
Returns true if these conflicts contain any set that contains the given package and extra name pair.
Sourcepub fn append(&mut self, other: &mut Self)
pub fn append(&mut self, other: &mut Self)
Appends the given conflicts to this one. This drains all sets from the conflicts given, such that after this call, it is empty.
Sourcepub fn expand_transitive_group_includes(
&mut self,
package: &PackageName,
groups: &DependencyGroups,
)
pub fn expand_transitive_group_includes( &mut self, package: &PackageName, groups: &DependencyGroups, )
Expand Conflictss to include all ConflictSets that can
be transitively inferred from group conflicts directly defined
in configuration.
A directed acyclic graph (DAG) is created representing all transitive group includes, with nodes corresponding to group conflict items. For every conflict item directly mentioned in configuration, its node starts with a set of canonical items with itself as the only member.
The graph is traversed one node at a time in topological order and canonical items are propagated to each neighbor. We also update our substitutions at each neighbor to reflect that this neighbor transitively includes all canonical items visited so far to reach it.
Finally, we apply the substitutions to the conflict sets that were
directly defined in configuration to generate all transitively inferable
ConflictSets.
There is an assumption that inclusion graphs will not be very large
or complex. This algorithm creates all combinations of substitutions.
Each resulting ConflictSet would also later correspond to a separate
resolver fork during resolution.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Conflicts
impl<'de> Deserialize<'de> for Conflicts
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Conflicts
impl StructuralPartialEq for Conflicts
Auto Trait Implementations§
impl Freeze for Conflicts
impl RefUnwindSafe for Conflicts
impl Send for Conflicts
impl Sync for Conflicts
impl Unpin for Conflicts
impl UnwindSafe for Conflicts
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.