Struct rustsec::database::Query[][src]

pub struct Query { /* fields omitted */ }

Queries against the RustSec database

Implementations

impl Query[src]

pub fn new() -> Self[src]

Create a new query

pub fn crate_scope() -> Self[src]

Create a new query which uses the default scope rules for crates:

  • Only Collection::Crates
  • Ignore yanked advisories
  • Ignore informational advisories

pub fn collection(self, collection: Collection) -> Self[src]

Set collection to query against

pub fn package(self, package: impl Into<Name>) -> Self[src]

Set package name to search for

pub fn package_version(
    self,
    package: impl Into<Name>,
    version: impl Into<Version>
) -> Self
[src]

Set package name to search for along with an associated version

pub fn severity(self, severity: Severity) -> Self[src]

Set minimum severity threshold according to the CVSS Qualitative Severity Rating Scale.

Vulnerabilities without associated CVSS information will always match regardless of what this is set to.

pub fn target_arch(self, arch: Arch) -> Self[src]

Set target architecture

pub fn target_os(self, os: OS) -> Self[src]

Set target operating system

pub fn year(self, year: u32) -> Self[src]

Query for vulnerabilities occurring in a specific year.

pub fn yanked(self, setting: bool) -> Self[src]

Query for yanked advisories.

By default they will be omitted from query results.

pub fn informational(self, setting: bool) -> Self[src]

Query for informational advisories. By default they will be omitted from query results.

pub fn matches(&self, advisory: &Advisory) -> bool[src]

Does this query match a given advisory?

Trait Implementations

impl Clone for Query[src]

impl Debug for Query[src]

impl Default for Query[src]

Auto Trait Implementations

impl RefUnwindSafe for Query

impl Send for Query

impl Sync for Query

impl Unpin for Query

impl UnwindSafe for Query

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.