Enum DependencySource
#[non_exhaustive]pub enum DependencySource {
Registry,
Git {
url: String,
rev: Option<String>,
},
Path {
path: String,
},
Url {
url: String,
},
Sdk {
sdk: String,
},
Workspace,
CustomRegistry {
url: String,
},
}Expand description
Dependency source location (shared across all ecosystems).
Covers the union of all source types across Cargo, npm, PyPI, Go, Dart, Bundler, Maven, and Gradle ecosystems.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Registry
Default package registry (crates.io, npm, PyPI, pub.dev, rubygems.org, Maven Central).
Git
Git repository dependency.
Fields
Path
Local filesystem path dependency.
Url
Direct URL to artifact (PyPI wheels, npm tarballs).
Sdk
SDK-provided dependency (Dart: sdk: flutter).
Workspace
Workspace-inherited dependency (Cargo: workspace = true).
CustomRegistry
Custom/alternative registry (Bundler custom sources, private registries).
Implementations§
§impl DependencySource
impl DependencySource
pub fn is_registry(&self) -> bool
pub fn is_registry(&self) -> bool
Returns true if this dependency comes from any registry (default or custom).
Registry dependencies support version fetching and update checks. Git, Path, Url, Sdk, and Workspace dependencies do not.
pub fn is_version_resolvable(&self) -> bool
pub fn is_version_resolvable(&self) -> bool
Returns true if version resolution is possible for this source.
Currently equivalent to is_registry(), but semantically distinct
for future extensibility (e.g., Git tags could support version listing).
Trait Implementations§
§impl Clone for DependencySource
impl Clone for DependencySource
§fn clone(&self) -> DependencySource
fn clone(&self) -> DependencySource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for DependencySource
impl Debug for DependencySource
§impl PartialEq for DependencySource
impl PartialEq for DependencySource
impl Eq for DependencySource
impl StructuralPartialEq for DependencySource
Auto Trait Implementations§
impl Freeze for DependencySource
impl RefUnwindSafe for DependencySource
impl Send for DependencySource
impl Sync for DependencySource
impl Unpin for DependencySource
impl UnwindSafe for DependencySource
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,
§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
§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>
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>
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>
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