pub enum SourceReplacementError {
MissingReplacement {
original: String,
},
AmbiguousReplacement {
original: String,
},
CredentialsInUrl {
url: String,
},
DuplicateAtSameLevel {
original: String,
},
Cycle {
hops: Vec<SourceLocator>,
},
}Expand description
Errors produced while parsing / resolving source replacements. Wording is stable so integration tests can match substrings.
Variants§
MissingReplacement
replace-with (or the inline index-path /
index-url) was missing — every entry must declare a
replacement.
AmbiguousReplacement
Both index-path and index-url were declared on the
same entry. A single replacement entry may only redirect
to one source.
CredentialsInUrl
A URL (either the original or the replacement) carried
userinfo (e.g., https://user:pass@example.com/...).
Cabin’s source-replacement model does not handle
credentials, so a URL with userinfo is rejected before
it can flow into log output or the lockfile. The url
field is expected to be redacted (*** in place of
userinfo) by the constructor so error rendering never
echoes the secret back to stderr / logs.
DuplicateAtSameLevel
The same original key appears in two replacement
declarations at the same precedence level.
Cycle
A replacement chain looped back to a previously-visited source.
Fields
hops: Vec<SourceLocator>Trait Implementations§
Source§impl Clone for SourceReplacementError
impl Clone for SourceReplacementError
Source§fn clone(&self) -> SourceReplacementError
fn clone(&self) -> SourceReplacementError
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 SourceReplacementError
impl Debug for SourceReplacementError
Source§impl Display for SourceReplacementError
impl Display for SourceReplacementError
Source§impl Error for SourceReplacementError
impl Error for SourceReplacementError
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 SourceReplacementError
impl PartialEq for SourceReplacementError
Source§fn eq(&self, other: &SourceReplacementError) -> bool
fn eq(&self, other: &SourceReplacementError) -> bool
self and other values to be equal, and is used by ==.impl Eq for SourceReplacementError
impl StructuralPartialEq for SourceReplacementError
Auto Trait Implementations§
impl Freeze for SourceReplacementError
impl RefUnwindSafe for SourceReplacementError
impl Send for SourceReplacementError
impl Sync for SourceReplacementError
impl Unpin for SourceReplacementError
impl UnsafeUnpin for SourceReplacementError
impl UnwindSafe for SourceReplacementError
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.