Struct ensc_testsuite::util::result::Result [−][src]
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]
V: Debug,
pub fn record_got(self) -> Self where
T: Debug,
[src]
T: Debug,
pub fn record_got_fn<F, R>(self, f: F) -> Self where
F: FnOnce(&T) -> R,
R: Debug,
[src]
F: FnOnce(&T) -> R,
R: Debug,
pub fn map<F, R>(self, f: F) -> Result<R> where
F: FnOnce(T) -> R,
[src]
F: FnOnce(T) -> R,
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,
T: RefUnwindSafe,
impl<T> Send for Result<T> where
T: Send,
T: Send,
impl<T> Sync for Result<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Result<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Result<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,