Trait lilos::exec::TestResult

source ·
pub trait TestResult {
    type Output;

    // Required method
    fn into_test_result(self) -> Option<Self::Output>;
}
Expand description

Trait implemented by things that indicate success or failure, to be used with Notify::until and friends.

In practice this is bool (if there’s no output associated with success) or Option<T> (if there is).

This is used by the various polling functions in this module.

Required Associated Types§

source

type Output

Type of content produced on success.

Required Methods§

source

fn into_test_result(self) -> Option<Self::Output>

Converts self into an Option that is Some on success, None on failure.

Implementations on Foreign Types§

source§

impl TestResult for bool

source§

impl<T> TestResult for Option<T>

§

type Output = T

source§

fn into_test_result(self) -> Option<Self::Output>

Implementors§