#[non_exhaustive]pub enum PackageSource {
Npm,
TarballURL {
url: String,
},
Git {
url: String,
},
}
Expand description
This is meant as a supplement to crate::Package
and isn’t very useful without it.
The special github:
type
is currently not recognized, and resolves to either PackageSource::Git
or PackageSource::TarballURL
,
depending on the package manager.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Npm
An npm registry. This has no properties because the only variables are crate::Package::name, crate::Package::version, and the registry URL, which is out of scope for this project.
TarballURL
Git
Implementations§
Source§impl PackageSource
impl PackageSource
pub fn source_type(&self) -> PackageSourceType
Trait Implementations§
Source§impl Clone for PackageSource
impl Clone for PackageSource
Source§fn clone(&self) -> PackageSource
fn clone(&self) -> PackageSource
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 moreSource§impl Debug for PackageSource
impl Debug for PackageSource
Source§impl PartialEq for PackageSource
impl PartialEq for PackageSource
impl Eq for PackageSource
impl StructuralPartialEq for PackageSource
Auto Trait Implementations§
impl Freeze for PackageSource
impl RefUnwindSafe for PackageSource
impl Send for PackageSource
impl Sync for PackageSource
impl Unpin for PackageSource
impl UnwindSafe for PackageSource
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