Skip to main content

Baseline

Enum Baseline 

Source
pub enum Baseline {
    Fingerprints(BTreeSet<String>),
    Ids {
        file_package: Option<String>,
        scoped: BTreeMap<String, BTreeSet<String>>,
        unscoped: BTreeSet<String>,
    },
}
Expand description

The findings a baseline file lists.

Variants§

§

Fingerprints(BTreeSet<String>)

As written before findings had names of their own: by fingerprint.

§

Ids

By the name of the finding (report::finding_id).

Fields

§file_package: Option<String>

Set when the baseline file was written for a single package.

§scoped: BTreeMap<String, BTreeSet<String>>

Entries that record their owning package (package -> finding ids).

§unscoped: BTreeSet<String>

Legacy entries (v2 or v3 without package) that match any package.

Implementations§

Source§

impl Baseline

Source

pub fn validate_for_package(&self, package: &str, path: &Path) -> Result<()>

Verifies that a single-package baseline file is not being applied to a different package.

Source

pub fn knows_in_package(&self, package: &str, finding: &Finding) -> bool

Whether this baseline suppresses finding when analysing package.

Source

pub fn knows(&self, finding: &Finding) -> bool

Trait Implementations§

Source§

impl Debug for Baseline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Baseline

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Baseline

Auto Trait Implementations§

§

impl Forget for Baseline

§

impl Freeze for Baseline
where *const LeafNode<String, SetValZST> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, SetValZST)>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const LeafNode<String, BTreeSet<String>> is !null: Freeze, PhantomData<Box<(String, BTreeSet<String>)>>: Freeze,

§

impl Move for Baseline

§

impl RefUnwindSafe for Baseline

§

impl Send for Baseline
where NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send, BoxRaw<(String, SetValZST)>: Send, RawVecInner: Send, NodeRef<Owned, String, BTreeSet<String>, LeafOrInternal>: Send, BoxRaw<(String, BTreeSet<String>)>: Send,

§

impl Sync for Baseline
where NodeRef<Owned, String, SetValZST, LeafOrInternal>: Sync, BoxRaw<(String, SetValZST)>: Sync, RawVecInner: Sync, NodeRef<Owned, String, BTreeSet<String>, LeafOrInternal>: Sync, BoxRaw<(String, BTreeSet<String>)>: Sync,

§

impl Unpin for Baseline
where *const LeafNode<String, SetValZST> is !null: Unpin, Box<(String, SetValZST)>: Unpin, *const u8 is !null: Unpin, *const LeafNode<String, BTreeSet<String>> is !null: Unpin, Box<(String, BTreeSet<String>)>: Unpin,

§

impl UnsafeUnpin for Baseline
where *const LeafNode<String, SetValZST> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const LeafNode<String, BTreeSet<String>> is !null: UnsafeUnpin, PhantomData<Box<(String, BTreeSet<String>)>>: UnsafeUnpin,

§

impl UnwindSafe for Baseline

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.