pub struct ThresholdConfig {
pub global: f64,
pub overrides: Vec<ThresholdOverride>,
}Expand description
Threshold configuration with optional per-path overrides.
When overrides are present, each function’s file path is tested against the override patterns in declaration order. The last matching override wins. If no override matches, the global threshold applies.
Fields§
§global: f64Global CRAP threshold (used when no override matches).
overrides: Vec<ThresholdOverride>Per-path overrides, evaluated in order (last match wins).
Implementations§
Source§impl ThresholdConfig
impl ThresholdConfig
Sourcepub fn has_overrides(&self) -> bool
pub fn has_overrides(&self) -> bool
Returns true if any per-path overrides are configured.
Trait Implementations§
Source§impl Clone for ThresholdConfig
impl Clone for ThresholdConfig
Source§fn clone(&self) -> ThresholdConfig
fn clone(&self) -> ThresholdConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThresholdConfig
impl Debug for ThresholdConfig
Source§impl Default for ThresholdConfig
impl Default for ThresholdConfig
Source§impl PartialEq for ThresholdConfig
impl PartialEq for ThresholdConfig
Source§fn eq(&self, other: &ThresholdConfig) -> bool
fn eq(&self, other: &ThresholdConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ThresholdConfig
Auto Trait Implementations§
impl Freeze for ThresholdConfig
impl RefUnwindSafe for ThresholdConfig
impl Send for ThresholdConfig
impl Sync for ThresholdConfig
impl Unpin for ThresholdConfig
impl UnsafeUnpin for ThresholdConfig
impl UnwindSafe for ThresholdConfig
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