#[non_exhaustive]pub struct AssertionSpec {
pub kind: String,
pub value: Option<Value>,
pub threshold: Option<f64>,
pub weight: f64,
pub metric: Option<String>,
pub transform: Option<String>,
pub config: Map<String, Value>,
}Expand description
One assertion as written in the file.
config holds every key other than the common ones (type, value,
threshold, weight, metric, transform), e.g. k for retrieval
metrics. Assertion factories validate it.
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.kind: StringThe assertion type, including any not- prefix.
value: Option<Value>§threshold: Option<f64>§weight: f64Contribution to the test score; 0 reports the result without gating the test.
metric: Option<String>Name to aggregate the score under in the summary.
transform: Option<String>Path selecting the value under test (output.field, outputs.text…).
config: Map<String, Value>Implementations§
Trait Implementations§
Source§impl Clone for AssertionSpec
impl Clone for AssertionSpec
Source§impl Debug for AssertionSpec
impl Debug for AssertionSpec
Source§impl PartialEq for AssertionSpec
impl PartialEq for AssertionSpec
impl StructuralPartialEq for AssertionSpec
Auto Trait Implementations§
impl Forget for AssertionSpec
impl Freeze for AssertionSpec
impl Move for AssertionSpec
impl RefUnwindSafe for AssertionSpec
impl Send for AssertionSpec
impl Sync for AssertionSpec
impl Unpin for AssertionSpec
impl UnsafeUnpin for AssertionSpec
impl UnwindSafe for AssertionSpec
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