pub struct IgnoreRules { /* private fields */ }Expand description
Normalized, ready-to-evaluate [update].ignore rules.
Built once per run via Self::new (normal mode, honoring an explicit --config’s
rules) or Self::empty (no --config given — FR-007: update never auto-discovers a
deps.toml, so there are never any rules to evaluate in that case).
Implementations§
Source§impl IgnoreRules
impl IgnoreRules
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
No rules — every dependency is eligible (FR-007’s no---config case).
Sourcepub fn new(rules: Vec<IgnoreRule>, formatter: &dyn EcosystemFormatter) -> Self
pub fn new(rules: Vec<IgnoreRule>, formatter: &dyn EcosystemFormatter) -> Self
Normalizes rules’ names via formatter.normalize_package_name once, up front, so
Self::skip_reason never has to.
Sourcepub fn matches_name(&self, normalized_name: &str) -> bool
pub fn matches_name(&self, normalized_name: &str) -> bool
Whether any rule names normalized_name at all, regardless of its update_types
scope — used only by --security-only’s FR-008 override report (never to suppress a
candidate there), since an overridden rule is reported as “would have applied”
independent of whether its scope would actually have matched this update’s kind.
Sourcepub fn skip_reason(
&self,
normalized_name: &str,
kind: UpdateKind,
) -> Option<SkipReason>
pub fn skip_reason( &self, normalized_name: &str, kind: UpdateKind, ) -> Option<SkipReason>
Whether a dependency named normalized_name (already normalized), classified kind,
should be skipped — Some(SkipReason::IgnoreRule) when a rule matches, None
otherwise.
A rule with no update_types matches every kind, including UpdateKind::Unknown. A
rule with update_types matches its listed kinds and Unknown — fail-closed
(FR-006): a rule that cannot confirm an update is below its stated threshold treats it
as if it met the threshold.
Trait Implementations§
Source§impl Debug for IgnoreRules
impl Debug for IgnoreRules
Auto Trait Implementations§
impl Freeze for IgnoreRules
impl RefUnwindSafe for IgnoreRules
impl Send for IgnoreRules
impl Sync for IgnoreRules
impl Unpin for IgnoreRules
impl UnsafeUnpin for IgnoreRules
impl UnwindSafe for IgnoreRules
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more