Skip to main content

Check

Struct Check 

Source
pub struct Check { /* private fields */ }
Expand description

A singular regression check.

This is one of the leaf elements of Report.

Implementations§

Source§

impl Check

Source

pub fn status(&self) -> Status

Return the Status of the check.

Source

pub fn info<T>(info: T) -> Self
where T: Display + Serialize + 'static,

Report info for diagnostic purposes.

See also: Report::info.

Source

pub fn error<T>(error: T) -> Self
where T: ToString,

Report an error.

See also: Report::error.

Source

pub fn equal<T>(old: T, new: T) -> Self
where T: Display + Serialize + PartialEq + 'static,

Assert that old == new.

See also: Report::error.

Source

pub fn equal_with_tolerance<T, U>( tolerance: &T, old: U, new: U, spec: FmtSpec, ) -> Self
where T: EqualWithTolerance<U>,

Source

pub fn higher_is_better<T, U>( tolerance: &T, old: U, new: U, spec: FmtSpec, ) -> Self
where T: HigherIsBetter<U>,

Construct a new Check using tolerance::HigherIsBetter.

See also: Report::higher_is_better.

Source

pub fn lower_is_better<T, U>( tolerance: &T, old: U, new: U, spec: FmtSpec, ) -> Self
where T: LowerIsBetter<U>,

Construct a new Report using tolerance::LowerIsBetter.

See also: Report::lower_is_better.

Trait Implementations§

Source§

impl Debug for Check

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Check> for Report

Source§

fn from(check: Check) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Check

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Check

§

impl !Send for Check

§

impl !Sync for Check

§

impl !UnwindSafe for Check

§

impl Forget for Check

§

impl Freeze for Check

§

impl Move for Check

§

impl Unpin for Check

§

impl UnsafeUnpin for Check

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.