pub enum SourceLocator {
IndexPath {
path: PathBuf,
},
IndexUrl {
url: String,
},
}Expand description
Stable, typed identifier for one supported source/index.
Keeping this enum closed (instead of stringly-typed (kind, value) pairs) means every consumer — resolver, lockfile,
metadata view — agrees on what each variant means and which
data it carries. New supported kinds extend the enum
explicitly.
Variants§
IndexPath
Local filesystem index. Carries the path verbatim; the orchestration layer absolutises against the declaring file’s directory before consulting the index loader.
IndexUrl
Sparse-HTTP index. Carries the URL verbatim; the orchestration layer rejects credential-bearing URLs at parse time so credentials never leak into the effective configuration.
Implementations§
Trait Implementations§
Source§impl Clone for SourceLocator
impl Clone for SourceLocator
Source§fn clone(&self) -> SourceLocator
fn clone(&self) -> SourceLocator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceLocator
impl Debug for SourceLocator
Source§impl<'de> Deserialize<'de> for SourceLocator
impl<'de> Deserialize<'de> for SourceLocator
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SourceLocator
impl Display for SourceLocator
Source§impl Hash for SourceLocator
impl Hash for SourceLocator
Source§impl Ord for SourceLocator
impl Ord for SourceLocator
Source§fn cmp(&self, other: &SourceLocator) -> Ordering
fn cmp(&self, other: &SourceLocator) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SourceLocator
impl PartialEq for SourceLocator
Source§fn eq(&self, other: &SourceLocator) -> bool
fn eq(&self, other: &SourceLocator) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SourceLocator
impl PartialOrd for SourceLocator
Source§impl Serialize for SourceLocator
impl Serialize for SourceLocator
impl Eq for SourceLocator
impl StructuralPartialEq for SourceLocator
Auto Trait Implementations§
impl Freeze for SourceLocator
impl RefUnwindSafe for SourceLocator
impl Send for SourceLocator
impl Sync for SourceLocator
impl Unpin for SourceLocator
impl UnsafeUnpin for SourceLocator
impl UnwindSafe for SourceLocator
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key and return true if they are equal.