logo
pub struct Query { /* private fields */ }
Expand description

Queries against the RustSec database

Implementations

Create a new query.

This creates a “wildcard” query with no constraints. Use the various builder methods of this type to restrict which advisories match.

Note that this differs from Query::default(), which scopes the query to crates (i.e. Query::crate_scope).

When in doubt, use Query::default().

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

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

Set collection to query against

Provide a package and use all of its attributes as part of the query

Set package name to search for.

Set package version to search for

Set package source (e.g. registry) where this package is located

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.

Set target architecture

Set target operating system

Query for vulnerabilities occurring in a specific year.

Query for withdrawn advisories.

By default they will be omitted from query results.

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

Does this query match a given advisory?

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.