Struct ensc_testsuite::util::result::Result[][src]

pub struct Result<T> { /* fields omitted */ }

Result of a testcase.

This includes both the returned value of the testcase and the status.

Example

let result = PlanRunner::new().ok("test", || Result::<_,()>::Ok(42));

assert!(result.is_ok());
assert_eq!(result.as_status(), TestStatus::Pass);
assert_eq!(result.into_value(), Some(Ok(42)));

Implementations

impl<T> Result<T>[src]

pub fn new(ret: Option<T>, case: TestCase) -> Self[src]

pub fn record_expect<V>(self, v: V) -> Self where
    V: Debug
[src]

pub fn record_got(self) -> Self where
    T: Debug
[src]

pub fn record_got_fn<F, R>(self, f: F) -> Self where
    F: FnOnce(&T) -> R,
    R: Debug
[src]

pub fn map<F, R>(self, f: F) -> Result<R> where
    F: FnOnce(T) -> R, 
[src]

pub fn is_ok(&self) -> bool[src]

pub fn as_status(&self) -> TestStatus[src]

pub fn into_case(self) -> TestCase[src]

pub fn into_value(self) -> Option<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Result<T> where
    T: RefUnwindSafe

impl<T> Send for Result<T> where
    T: Send

impl<T> Sync for Result<T> where
    T: Sync

impl<T> Unpin for Result<T> where
    T: Unpin

impl<T> UnwindSafe for Result<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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<V, T> VZip<V> for T where
    V: MultiLane<T>,