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
impl BaselineFilter
Sourcepub fn load(config: &Config) -> Result<Self>
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.
Sourcepub const fn none() -> Self
pub const fn none() -> Self
A filter that suppresses nothing, for a run recording a baseline rather than judging against one.
Sourcepub const fn is_in_effect(&self) -> bool
pub const fn is_in_effect(&self) -> bool
Whether a baseline was loaded at all.
Sourcepub fn retain_new(
&self,
kind: BaselineKind,
groups: Vec<DuplicateGroup>,
) -> Vec<DuplicateGroup>
pub fn retain_new( &self, kind: BaselineKind, groups: Vec<DuplicateGroup>, ) -> Vec<DuplicateGroup>
Drop the groups the baseline already accounts for.
Auto Trait Implementations§
impl Freeze for BaselineFilter
impl RefUnwindSafe for BaselineFilter
impl Send for BaselineFilter
impl Sync for BaselineFilter
impl Unpin for BaselineFilter
impl UnsafeUnpin for BaselineFilter
impl UnwindSafe for BaselineFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more