pub enum DepSource {
CratesIo,
Git {
url: String,
rev: Option<String>,
},
Path,
OtherRegistry {
url: String,
},
}Expand description
Where a vulnerable package resolves from — which registry, git remote, or
local path. This is the identity a VEX subcomponent PURL must carry (spec
§4.1): a crates.io dep is the bare pkg:cargo/<name>@<ver> PURL, but a git or
alternate-registry dep needs a qualifier so a downstream scanner matches the
exact artifact. Captured here so the PURL can be derived without re-reading the
lockfile. Additive — defaults to CratesIo so a report
written before this field existed keeps the crates.io assumption it shipped with.
Variants§
CratesIo
The default crates.io registry — the overwhelmingly common case.
Git
A git dependency: the remote URL and the locked commit, when known.
Fields
Path
A local path dependency or workspace member — not a published artifact.
OtherRegistry
Another registry (alternate / sparse / local): its index URL.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DepSource
impl<'de> Deserialize<'de> for DepSource
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>,
impl Eq for DepSource
impl StructuralPartialEq for DepSource
Auto Trait Implementations§
impl Freeze for DepSource
impl RefUnwindSafe for DepSource
impl Send for DepSource
impl Sync for DepSource
impl Unpin for DepSource
impl UnsafeUnpin for DepSource
impl UnwindSafe for DepSource
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.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