pub struct ThresholdCheckResult {
pub breached: bool,
pub breaches: Vec<ThresholdBreachInfo>,
pub applied_overrides: BTreeMap<String, AppliedOverrideInfo>,
}Expand description
Result of super::thresholds::compute_thresholds_check.
breached is true when at least one threshold was exceeded. breaches
is empty on the first-snapshot path (all DivergenceSummary fields None).
applied_overrides enumerates every entry from cfg.overrides with an
active flag and parsed expires, for diagnostic consumers and sdivi check --format json.
§Examples
use sdivi_core::compute::thresholds::{compute_thresholds_check, ThresholdCheckResult};
use sdivi_core::input::ThresholdsInput;
use sdivi_core::null_summary;
let result = compute_thresholds_check(&null_summary(), &ThresholdsInput::default());
assert!(!result.breached);
assert!(result.breaches.is_empty());
assert!(result.applied_overrides.is_empty());Fields§
§breached: booltrue when at least one threshold was exceeded.
breaches: Vec<ThresholdBreachInfo>Per-dimension details for each exceeded threshold.
applied_overrides: BTreeMap<String, AppliedOverrideInfo>Diagnostic map of every override entry: which were active, which expired.
Trait Implementations§
Source§impl Clone for ThresholdCheckResult
impl Clone for ThresholdCheckResult
Source§fn clone(&self) -> ThresholdCheckResult
fn clone(&self) -> ThresholdCheckResult
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 ThresholdCheckResult
impl Debug for ThresholdCheckResult
Source§impl<'de> Deserialize<'de> for ThresholdCheckResult
impl<'de> Deserialize<'de> for ThresholdCheckResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ThresholdCheckResult
impl PartialEq for ThresholdCheckResult
Source§fn eq(&self, other: &ThresholdCheckResult) -> bool
fn eq(&self, other: &ThresholdCheckResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ThresholdCheckResult
impl Serialize for ThresholdCheckResult
impl StructuralPartialEq for ThresholdCheckResult
Auto Trait Implementations§
impl Freeze for ThresholdCheckResult
impl RefUnwindSafe for ThresholdCheckResult
impl Send for ThresholdCheckResult
impl Sync for ThresholdCheckResult
impl Unpin for ThresholdCheckResult
impl UnsafeUnpin for ThresholdCheckResult
impl UnwindSafe for ThresholdCheckResult
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