[][src]Struct expectest::core::ActualValue

pub struct ActualValue<A> { /* fields omitted */ }

Represent an actual value and optional location of a test case in a source code.

Methods

impl<A> ActualValue<A>[src]

pub fn new(value: A) -> Self[src]

Creates a new instance of ActualValue using value.

Also to create a new instance you can use expect function or expect! macro. Macro is better because it can save location of a test case in a source code.

pub fn location(self, l: SourceLocation) -> Self[src]

Sets a new SourceLocation.

pub fn to<M, E>(self, matcher: M) -> TestResult where
    M: Matcher<A, E>, 
[src]

Performs assertion matching using matcher. Returns a new instance of TestResult.

pub fn to_not<M, E>(self, matcher: M) -> TestResult where
    M: Matcher<A, E>, 
[src]

Performs negation matching using matcher. Returns a new instance of TestResult.

pub fn not_to<M, E>(self, matcher: M) -> TestResult where
    M: Matcher<A, E>, 
[src]

Performs negation matching using matcher. Returns a new instance of TestResult.

Trait Implementations

impl<A: Debug> Debug for ActualValue<A>[src]

Auto Trait Implementations

impl<A> Send for ActualValue<A> where
    A: Send

impl<A> Sync for ActualValue<A> where
    A: Sync

impl<A> Unpin for ActualValue<A> where
    A: Unpin

impl<A> UnwindSafe for ActualValue<A> where
    A: UnwindSafe

impl<A> RefUnwindSafe for ActualValue<A> where
    A: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]