pub struct SourceVersionDescriptor { /* private fields */ }Expand description
Source/version descriptor. It is a constraint defined by a specific crate::Dependency
rather than by a crate::PackageSource.
Implementations§
Source§impl SourceVersionDescriptor
impl SourceVersionDescriptor
pub fn is_npm(&self) -> bool
pub fn is_npm_tag(&self) -> bool
pub fn is_tar(&self) -> bool
pub fn is_git(&self) -> bool
pub fn is_github(&self) -> bool
Sourcepub fn aliased_package_name(&self) -> Option<PackageNameBorrowed<'_>>
pub fn aliased_package_name(&self) -> Option<PackageNameBorrowed<'_>>
Package name specified as aliased in the version descriptor.
§Example
let svd = SourceVersionDescriptor::new(
"npm:@chastelock/testcase@^2.1.37".to_string()).unwrap();
assert_eq!(svd.aliased_package_name().unwrap(), "@chastelock/testcase");pub fn ssh_path_sep(&self) -> Option<&str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SourceVersionDescriptor
impl RefUnwindSafe for SourceVersionDescriptor
impl Send for SourceVersionDescriptor
impl Sync for SourceVersionDescriptor
impl Unpin for SourceVersionDescriptor
impl UnwindSafe for SourceVersionDescriptor
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