pub enum ConflictReason {
Semver,
Links(InternedString),
MissingFeatures(InternedString),
RequiredDependencyAsFeature(InternedString),
NonImplicitDependencyAsFeature(InternedString),
PublicDependency(PackageId),
PubliclyExports(PackageId),
}
Expand description
All possible reasons that a package might fail to activate.
We maintain a list of conflicts for error reporting as well as backtracking purposes. Each reason here is why candidates may be rejected or why we may fail to resolve a dependency.
Variants§
Semver
There was a semver conflict, for example we tried to activate a package 1.0.2 but 1.1.0 was already activated (aka a compatible semver version is already activated)
Links(InternedString)
The links
key is being violated. For example one crate in the
dependency graph has links = "foo"
but this crate also had that, and
we’re only allowed one per dependency graph.
MissingFeatures(InternedString)
A dependency listed features that weren’t actually available on the
candidate. For example we tried to activate feature foo
but the
candidate we’re activating didn’t actually have the feature foo
.
RequiredDependencyAsFeature(InternedString)
A dependency listed a feature that ended up being a required dependency.
For example we tried to activate feature foo
but the
candidate we’re activating didn’t actually have the feature foo
it had a dependency foo
instead.
NonImplicitDependencyAsFeature(InternedString)
A dependency listed a feature for an optional dependency, but that
optional dependency is “hidden” using namespaced dep:
syntax.
PublicDependency(PackageId)
pub dep error
PubliclyExports(PackageId)
Implementations§
source§impl ConflictReason
impl ConflictReason
pub fn is_links(&self) -> bool
pub fn is_missing_features(&self) -> bool
pub fn is_required_dependency_as_features(&self) -> bool
pub fn is_public_dependency(&self) -> bool
Trait Implementations§
source§impl Clone for ConflictReason
impl Clone for ConflictReason
source§fn clone(&self) -> ConflictReason
fn clone(&self) -> ConflictReason
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ConflictReason
impl Debug for ConflictReason
source§impl Ord for ConflictReason
impl Ord for ConflictReason
source§fn cmp(&self, other: &ConflictReason) -> Ordering
fn cmp(&self, other: &ConflictReason) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ConflictReason
impl PartialEq for ConflictReason
source§fn eq(&self, other: &ConflictReason) -> bool
fn eq(&self, other: &ConflictReason) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ConflictReason
impl PartialOrd for ConflictReason
source§fn partial_cmp(&self, other: &ConflictReason) -> Option<Ordering>
fn partial_cmp(&self, other: &ConflictReason) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ConflictReason
impl StructuralPartialEq for ConflictReason
Auto Trait Implementations§
impl Freeze for ConflictReason
impl RefUnwindSafe for ConflictReason
impl Send for ConflictReason
impl Sync for ConflictReason
impl Unpin for ConflictReason
impl UnwindSafe for ConflictReason
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Semver
: 0 bytesLinks
: 16 bytesMissingFeatures
: 16 bytesRequiredDependencyAsFeature
: 16 bytesNonImplicitDependencyAsFeature
: 16 bytesPublicDependency
: 8 bytesPubliclyExports
: 8 bytes