Struct rustsec::database::Database [−][src]
Database of RustSec security advisories, indexed both by ID and collection
Implementations
impl Database
[src]
pub fn open(path: &Path) -> Result<Self, Error>
[src]
Open Database
located at the given local path
pub fn load_from_repo(repo: &Repository) -> Result<Self, Error>
[src]
Load Database
from the given git::Repository
pub fn fetch() -> Result<Self, Error>
[src]
Fetch the default advisory database from GitHub
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,
package_scope: impl Into<Package>
) -> Vec<Vulnerability>
[src]
&self,
lockfile: &Lockfile,
query: &Query,
package_scope: impl Into<Package>
) -> Vec<Vulnerability>
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) -> Option<&Commit>
[src]
Get information about the latest commit to the repo
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,