pub enum VulnerabilitySource {
PypaZip(PypaSource),
Pypi(PypiSource),
Osv(OsvSource),
}Expand description
Enum representing available vulnerability sources
Variants§
PypaZip(PypaSource)
PyPA Advisory Database (ZIP download)
Pypi(PypiSource)
PyPI JSON API
Osv(OsvSource)
OSV.dev batch API
Implementations§
Source§impl VulnerabilitySource
impl VulnerabilitySource
Sourcepub fn new(
source: VulnerabilitySource,
cache: AuditCache,
no_cache: bool,
) -> Self
pub fn new( source: VulnerabilitySource, cache: AuditCache, no_cache: bool, ) -> Self
Create a new vulnerability source from the CLI option
Sourcepub async fn fetch_vulnerabilities(
&self,
packages: &[(String, String)],
) -> Result<VulnerabilityDatabase>
pub async fn fetch_vulnerabilities( &self, packages: &[(String, String)], ) -> Result<VulnerabilityDatabase>
Fetch vulnerabilities for the given packages
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VulnerabilitySource
impl !RefUnwindSafe for VulnerabilitySource
impl Send for VulnerabilitySource
impl Sync for VulnerabilitySource
impl Unpin for VulnerabilitySource
impl !UnwindSafe for VulnerabilitySource
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