pub enum DependencySpec {
Semver {
range: String,
},
Alias {
real_name: String,
range: String,
},
Git {
url: String,
reference: Option<String>,
},
Github {
user: String,
repo: String,
reference: Option<String>,
},
File {
path: String,
},
Link {
path: String,
},
Workspace {
range: String,
},
Catalog {
catalog_name: Option<String>,
},
}Expand description
Parsed dependency specifier — determines how to resolve a dependency.
Variants§
Semver
Standard semver range (e.g. “^1.0.0”, “~2.3”, “>=0.0.0”).
Alias
npm alias (e.g. “npm:strip-ansi@^6.0.1”) — resolves real_name at range
but installs under the dependency key’s name.
Git
Git URL (e.g. “git+https://github.com/user/repo.git#ref”).
Github
GitHub shorthand (e.g. “user/repo”, “user/repo#branch”).
File
Local file path (e.g. “file:../my-lib”).
Link
Symlink (e.g. “link:../my-lib”).
Workspace
Workspace reference (e.g. “workspace:*”, “workspace:^”, “workspace:~1.0.0”).
Catalog
Catalog reference (e.g. “catalog:”, “catalog:testing”).
Implementations§
Trait Implementations§
Source§impl Clone for DependencySpec
impl Clone for DependencySpec
Source§fn clone(&self) -> DependencySpec
fn clone(&self) -> DependencySpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DependencySpec
impl RefUnwindSafe for DependencySpec
impl Send for DependencySpec
impl Sync for DependencySpec
impl Unpin for DependencySpec
impl UnsafeUnpin for DependencySpec
impl UnwindSafe for DependencySpec
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<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