osv-db 0.3.0

A Rust library for syncing and querying the OSV (Open Source Vulnerabilities) database
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::Deserialize;

use crate::types::EcosystemWithSuffix;

pub type PackageName = String;

/// Identity of an affected package within its ecosystem.
#[derive(Debug, Clone, Deserialize)]
pub struct Package {
    /// Ecosystem name, optionally with a suffix (e.g. `"Debian:10"`).
    pub ecosystem: EcosystemWithSuffix,
    /// Package name as used within the ecosystem.
    pub name: PackageName,
    /// Optional Package URL (<https://github.com/package-url/purl-spec>).
    pub purl: Option<String>,
}