Skip to main content

BaselineFilter

Struct BaselineFilter 

Source
pub struct BaselineFilter { /* private fields */ }
Expand description

Keeps the duplication a baseline did not already account for.

With no baseline configured this is the identity, and is_in_effect says so – which is what lets the summary report a suppressed count only when there is something doing the suppressing.

Implementations§

Source§

impl BaselineFilter

Source

pub fn load(config: &Config) -> Result<Self>

Read the baseline config names, if it names one.

§Errors

Returns crate::error::Error::Baseline when a baseline is named and cannot be read.

Source

pub const fn none() -> Self

A filter that suppresses nothing, for a run recording a baseline rather than judging against one.

Source

pub const fn is_in_effect(&self) -> bool

Whether a baseline was loaded at all.

Source

pub fn retain_new( &self, kind: BaselineKind, groups: Vec<DuplicateGroup>, ) -> Vec<DuplicateGroup>

Drop the groups the baseline already accounts for.

Auto Trait Implementations§

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, 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.