[][src]Struct rustsec::database::Database

pub struct Database { /* fields omitted */ }

Database of RustSec security advisories, indexed both by ID and collection

Methods

impl Database[src]

pub fn fetch() -> Result<Self, Error>[src]

Fetch the default advisory database from GitHub

pub fn load(repo: &Repository) -> Result<Self, Error>[src]

Load Database from the given Repository

pub fn get(&self, id: &Id) -> Option<&Advisory>[src]

Look up an advisory by an advisory ID (e.g. "RUSTSEC-YYYY-XXXX")

pub fn query(&self, query: &Query) -> Vec<&Advisory>[src]

Query the database according to the given query object

pub fn query_vulnerabilities(
    &self,
    lockfile: &Lockfile,
    query: &Query
) -> Vec<Vulnerability>
[src]

Find vulnerabilities in the provided Lockfile which match a given query.

pub fn vulnerabilities(&self, lockfile: &Lockfile) -> Vec<Vulnerability>[src]

Scan for vulnerabilities in the provided Lockfile.

pub fn iter(&self) -> Iter[src]

Iterate over all of the advisories in the database

pub fn latest_commit(&self) -> &Commit[src]

Get information about the latest commit to the repo

Trait Implementations

impl Debug for Database[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]