[−][src]Struct rustsec::database::Query
Queries against the RustSec database
Methods
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 obsolete 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]
self,
package: impl Into<Name>,
version: impl Into<Version>
) -> Self
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 obsolete(self, setting: bool) -> Self
[src]
Query for obsolete vulnerabilities. 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
Auto Trait Implementations
impl Send for Query
impl Unpin for Query
impl Sync for Query
impl UnwindSafe for Query
impl RefUnwindSafe for Query
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,