pub enum PolicyIncomplete {
NotUtf8 {
path: Vec<u8>,
},
ManifestSyntax {
path: Vec<u8>,
detail: String,
},
ManifestShape {
path: Vec<u8>,
problem: String,
},
DuplicateName {
name: String,
first: Vec<u8>,
second: Vec<u8>,
},
}Expand description
What: Why the planner’s own machinery could not finish although its input was read.
Why: The engine reports each of these as policy-incomplete. ManifestShape carries
the incumbent’s ManifestShapeError text exactly, so both implementations can
be compared message for message.
In TS you’d write (pseudocode):
type PolicyIncomplete = { kind: 'not-utf8'; path } | { kind: 'manifest-syntax'; path; detail } | { kind: 'manifest-shape'; path; problem } | { kind: 'duplicate-name'; name; first; second };Variants§
NotUtf8
A manifest or the registry configuration is not valid UTF-8.
ManifestSyntax
A manifest is not JSON.
ManifestShape
A manifest is JSON but lacks a fact the plan needs, or its version cannot be rewritten in place.
Fields
DuplicateName
Two workspace manifests declare the same package name, so the dependency graph is ambiguous.
Trait Implementations§
Source§impl Clone for PolicyIncomplete
impl Clone for PolicyIncomplete
Source§impl Debug for PolicyIncomplete
impl Debug for PolicyIncomplete
impl Eq for PolicyIncomplete
Source§impl From<PolicyIncomplete> for PlanError
What: Lift a machinery failure into a planning failure.
Why: Lets the planner write read_manifest_facts(...)?.
impl From<PolicyIncomplete> for PlanError
What: Lift a machinery failure into a planning failure.
Why: Lets the planner write read_manifest_facts(...)?.
In TS you’d write (pseudocode):
const failure: PlanError = { kind: 'policy-incomplete', error };Source§fn from(error: PolicyIncomplete) -> PlanError
fn from(error: PolicyIncomplete) -> PlanError
Wrap the machinery failure.
Source§impl PartialEq for PolicyIncomplete
impl PartialEq for PolicyIncomplete
impl StructuralPartialEq for PolicyIncomplete
Auto Trait Implementations§
impl Freeze for PolicyIncomplete
impl RefUnwindSafe for PolicyIncomplete
impl Send for PolicyIncomplete
impl Sync for PolicyIncomplete
impl Unpin for PolicyIncomplete
impl UnsafeUnpin for PolicyIncomplete
impl UnwindSafe for PolicyIncomplete
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
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
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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 more