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, Error>
Fetch the advisory database from the server where it is stored
fn from_toml(data: &str) -> Result<Self, Error>
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>, Error>
crate_name: &str,
version_str: &str)
-> Result<Vec<&Advisory>, Error>
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