pub struct Incompatibility<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> {
pub kind: Kind<P, VS, M>,
/* private fields */
}Expand description
An incompatibility is a set of terms for different packages
that should never be satisfied all together.
An incompatibility usually originates from a package dependency.
For example, if package A at version 1 depends on package B
at version 2, you can never have both terms A = 1
and not B = 2 satisfied at the same time in a partial solution.
This would mean that we found a solution with package A at version 1
but not with package B at version 2.
Yet A at version 1 depends on B at version 2 so this is not possible.
Therefore, the set { A = 1, not B = 2 } is an incompatibility,
defined from dependencies of A at version 1.
Incompatibilities can also be derived from two other incompatibilities during conflict resolution. More about all this in PubGrub documentation.
Fields§
§kind: Kind<P, VS, M>The reason for the incompatibility.
Implementations§
Source§impl<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> Incompatibility<P, VS, M>
impl<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> Incompatibility<P, VS, M>
Sourcepub fn no_versions(package: Id<P>, term: Term<VS>) -> Self
pub fn no_versions(package: Id<P>, term: Term<VS>) -> Self
Create an incompatibility to remember that a given set does not contain any version.
Sourcepub fn custom_term(package: Id<P>, term: Term<VS>, metadata: M) -> Self
pub fn custom_term(package: Id<P>, term: Term<VS>, metadata: M) -> Self
Create an incompatibility for a reason outside pubgrub.
Sourcepub fn custom_version(package: Id<P>, version: VS::V, metadata: M) -> Self
pub fn custom_version(package: Id<P>, version: VS::V, metadata: M) -> Self
Create an incompatibility for a reason outside pubgrub.
Sourcepub fn from_dependency(package: Id<P>, versions: VS, dep: (Id<P>, VS)) -> Self
pub fn from_dependency(package: Id<P>, versions: VS, dep: (Id<P>, VS)) -> Self
Build an incompatibility from a given dependency.
Trait Implementations§
Source§impl<P: Clone + Package, VS: Clone + VersionSet, M: Clone + Eq + Clone + Debug + Display> Clone for Incompatibility<P, VS, M>
impl<P: Clone + Package, VS: Clone + VersionSet, M: Clone + Eq + Clone + Debug + Display> Clone for Incompatibility<P, VS, M>
Source§fn clone(&self) -> Incompatibility<P, VS, M>
fn clone(&self) -> Incompatibility<P, VS, M>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more