Discrepancy

Enum Discrepancy 

Source
pub enum Discrepancy<'expectation, 'actual> {
    MissingRegion {
        region: &'expectation Region,
    },
    Changed {
        expect: &'expectation [u8],
        actual: &'actual [u8],
        region: &'expectation Region,
    },
}
Expand description

Embodies a difference of the expectation of the byte buffer and what is actually there

Variants§

§

MissingRegion

The given buffer does not have enough length to be tested

Fields

§region: &'expectation Region

The region being tested

§

Changed

The given buffer did not have the expected byte values

Fields

§expect: &'expectation [u8]

Expected byte values

§actual: &'actual [u8]

Actual byte values

§region: &'expectation Region

The region being tested

Trait Implementations§

Source§

impl<'expectation, 'actual> Debug for Discrepancy<'expectation, 'actual>

Source§

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

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

impl<'e, 'a> Display for Discrepancy<'e, 'a>

Source§

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

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

impl<'expectation, 'actual> PartialEq for Discrepancy<'expectation, 'actual>

Source§

fn eq(&self, other: &Discrepancy<'expectation, 'actual>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'expectation, 'actual> Eq for Discrepancy<'expectation, 'actual>

Source§

impl<'expectation, 'actual> StructuralPartialEq for Discrepancy<'expectation, 'actual>

Auto Trait Implementations§

§

impl<'expectation, 'actual> Freeze for Discrepancy<'expectation, 'actual>

§

impl<'expectation, 'actual> RefUnwindSafe for Discrepancy<'expectation, 'actual>

§

impl<'expectation, 'actual> Send for Discrepancy<'expectation, 'actual>

§

impl<'expectation, 'actual> Sync for Discrepancy<'expectation, 'actual>

§

impl<'expectation, 'actual> Unpin for Discrepancy<'expectation, 'actual>

§

impl<'expectation, 'actual> UnwindSafe for Discrepancy<'expectation, 'actual>

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.