pub enum PatchValidationError {
MissingSource {
package: String,
},
MissingManifest {
package: String,
path: String,
},
ManifestHasNoPackage {
package: String,
path: String,
},
PackageNameMismatch {
package: String,
actual: String,
},
VersionMismatch {
package: String,
version: String,
requirement: String,
},
DuplicateAtSameLevel {
package: String,
},
}Expand description
Errors produced while validating patch declarations. Wording is intentionally stable so integration tests can match substrings.
Variants§
MissingSource
A patch table did not declare any source. The expected
shape is { path = "..." }; the parser surfaces this when
no recognized key was supplied.
MissingManifest
The patched package directory does not contain a
cabin.toml. Cabin prefers a clear early error to the
later confusing “manifest not found” failure.
ManifestHasNoPackage
The patched directory’s cabin.toml exists and parses but
declares no [package] table (for example a pure
[workspace] root), so there is no package to patch in
with.
PackageNameMismatch
The patched package’s manifest declares a different
[package].name than the patch table key.
VersionMismatch
The patched package’s version does not satisfy the version requirement of an active dependency on it.
DuplicateAtSameLevel
The same package name appears in two patch declarations at the same precedence level. Across precedence levels the higher level overrides; within a level, duplicates are rejected so two co-equal config files cannot silently disagree about a patch.
Trait Implementations§
Source§impl Clone for PatchValidationError
impl Clone for PatchValidationError
Source§fn clone(&self) -> PatchValidationError
fn clone(&self) -> PatchValidationError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PatchValidationError
impl Debug for PatchValidationError
Source§impl Display for PatchValidationError
impl Display for PatchValidationError
Source§impl Error for PatchValidationError
impl Error for PatchValidationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for PatchValidationError
impl PartialEq for PatchValidationError
Source§fn eq(&self, other: &PatchValidationError) -> bool
fn eq(&self, other: &PatchValidationError) -> bool
self and other values to be equal, and is used by ==.impl Eq for PatchValidationError
impl StructuralPartialEq for PatchValidationError
Auto Trait Implementations§
impl Freeze for PatchValidationError
impl RefUnwindSafe for PatchValidationError
impl Send for PatchValidationError
impl Sync for PatchValidationError
impl Unpin for PatchValidationError
impl UnsafeUnpin for PatchValidationError
impl UnwindSafe for PatchValidationError
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
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§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.