Skip to main content

Obs

Struct Obs 

Source
pub struct Obs {
    pub lt: bool,
    pub eq: bool,
    pub gt: bool,
    pub un: bool,
    pub unvalued: bool,
    pub max_neg: Option<i128>,
    pub min_pos: Option<i128>,
    pub unfloat: bool,
    pub f_max_neg: Option<f64>,
    pub f_min_pos: Option<f64>,
}
Expand description

What the tests observed at one comparison, summarised. Merging is commutative, associative and idempotent, so trace lines can be folded in any order.

Fields§

§lt: bool§eq: bool§gt: bool§un: bool§unvalued: bool

Some observation did not carry integer values, so max_neg/min_pos are incomplete.

§max_neg: Option<i128>

Largest observed D < 0.

§min_pos: Option<i128>

Smallest observed D > 0.

§unfloat: bool

Some observation did not carry float values, so the two fields below are incomplete.

§f_max_neg: Option<f64>

Largest observed negative and smallest observed positive float difference.

§f_min_pos: Option<f64>

Implementations§

Source§

impl Obs

Source

pub fn reached(&self) -> bool

Source

pub fn valued(&self) -> bool

Source

pub fn merge(&mut self, other: &Obs)

Source

pub fn of_d(d: i128) -> Obs

Summary of a single observation of integer operands with difference d.

Source

pub fn of_rel(rel: Rel) -> Obs

Summary of a single observation without integer values.

Source

pub fn of_f(d: f64) -> Obs

Summary of a single observation of float operands with difference d.

Source

pub fn float_gap(&self) -> Option<(f64, f64)>

The gap around zero that no float observation fell into, when every observation was a float and both sides were seen.

Trait Implementations§

Source§

impl Clone for Obs

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Obs

Source§

impl Debug for Obs

Source§

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

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

impl Default for Obs

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Obs

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Obs

Auto Trait Implementations§

§

impl Forget for Obs

§

impl Freeze for Obs

§

impl Move for Obs

§

impl RefUnwindSafe for Obs

§

impl Send for Obs

§

impl Sync for Obs

§

impl Unpin for Obs

§

impl UnsafeUnpin for Obs

§

impl UnwindSafe for Obs

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.