#[non_exhaustive]pub struct CustomMetricViolation {
pub type_info: TypeInfo,
pub metric_name: String,
pub description: String,
pub value: f64,
}Expand description
A Rust type whose custom metric value did not satisfy a user predicate.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_info: TypeInfoThe complete immutable Rust type evidence supplied to both callbacks.
metric_name: StringThe user-defined metric name.
description: StringThe user-defined metric description.
value: f64The calculated value rejected by the predicate.
Implementations§
Trait Implementations§
Source§impl Clone for CustomMetricViolation
impl Clone for CustomMetricViolation
Source§fn clone(&self) -> CustomMetricViolation
fn clone(&self) -> CustomMetricViolation
Returns a copy of the value. Read more
1.0.0 · 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 CustomMetricViolation
impl Debug for CustomMetricViolation
Source§impl From<CustomMetricViolation> for Violation
impl From<CustomMetricViolation> for Violation
Source§fn from(violation: CustomMetricViolation) -> Self
fn from(violation: CustomMetricViolation) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CustomMetricViolation
impl PartialEq for CustomMetricViolation
impl StructuralPartialEq for CustomMetricViolation
Auto Trait Implementations§
impl Freeze for CustomMetricViolation
impl RefUnwindSafe for CustomMetricViolation
impl Send for CustomMetricViolation
impl Sync for CustomMetricViolation
impl Unpin for CustomMetricViolation
impl UnwindSafe for CustomMetricViolation
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