#[non_exhaustive]pub enum Tolerance {
Absolute(f64),
Relative(f64),
}Expand description
How much worse than the control a guardrail metric may get before it is breached (spec 3.5 §7.12).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Absolute(f64)
An absolute margin in the metric’s units: Absolute(0.002) tolerates 0.2 percentage
points more unsubscribes. Absolute(0.0) breaches on any proven harm.
Relative(f64)
A margin relative to the control: Relative(0.1) tolerates the variant being up to 10%
worse than the control.
Trait Implementations§
impl Copy for Tolerance
Source§impl<'de> Deserialize<'de> for Tolerance
impl<'de> Deserialize<'de> for Tolerance
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
impl StructuralPartialEq for Tolerance
Auto Trait Implementations§
impl Forget for Tolerance
impl Freeze for Tolerance
impl Move for Tolerance
impl RefUnwindSafe for Tolerance
impl Send for Tolerance
impl Sync for Tolerance
impl Unpin for Tolerance
impl UnsafeUnpin for Tolerance
impl UnwindSafe for Tolerance
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