pub struct Expectation { /* private fields */ }Expand description
An expectation of a specification, validated.
Implementations§
Source§impl Expectation
impl Expectation
Sourcepub fn from_json(v: &Json) -> Result<Expectation>
pub fn from_json(v: &Json) -> Result<Expectation>
Sourcepub fn check(
&self,
results: &[ConditionResult],
confidence: f64,
) -> Result<Vec<Check>>
pub fn check( &self, results: &[ConditionResult], confidence: f64, ) -> Result<Vec<Check>>
Check the expectation on the results of a run.
§Errors
Error::Config for a missing metric or variable, or an expectation that checks
no condition (see the module documentation).
Source§impl Expectation
impl Expectation
Sourcepub fn check_search(&self, results: &[SearchResult]) -> Result<Vec<Check>>
pub fn check_search(&self, results: &[SearchResult]) -> Result<Vec<Check>>
Check the expectation on the operating points of a search: the expected value of
the searched variable must lie within atol + rtol |e| of the estimate, or (with
interval) inside the confidence interval of the search widened by atol.
§Errors
Error::Config if the expectation is not about the searched variable, or checks
no operating point.
Trait Implementations§
Source§impl Clone for Expectation
impl Clone for Expectation
Auto Trait Implementations§
impl Freeze for Expectation
impl RefUnwindSafe for Expectation
impl Send for Expectation
impl Sync for Expectation
impl Unpin for Expectation
impl UnsafeUnpin for Expectation
impl UnwindSafe for Expectation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more