Struct rustsec::AdvisoryDatabase
[−]
[src]
pub struct AdvisoryDatabase { /* fields omitted */ }
A collection of security advisories, indexed both by ID and crate
Methods
impl AdvisoryDatabase
[src]
fn fetch() -> Result<Self>
Fetch the advisory database from the server where it is stored
fn fetch_from_url(url: &str) -> Result<Self>
Fetch advisory database from a custom URL
fn from_toml(data: &str) -> Result<Self>
Parse the advisory database from a TOML serialization of it
fn find(&self, id: &str) -> Option<&Advisory>
Look up an advisory by an advisory ID (e.g. "RUSTSEC-YYYY-XXXX")
fn find_by_crate(&self, crate_name: &str) -> Vec<&Advisory>
Look up advisories relevant to a particular crate
fn find_vulns_for_crate(&self,
crate_name: &str,
version_str: &str)
-> Result<Vec<&Advisory>>
crate_name: &str,
version_str: &str)
-> Result<Vec<&Advisory>>
Find advisories that are unpatched and impact a given crate and version
fn iter(&self) -> Iter<String, Advisory>
Iterate over all of the advisories in the database