fuchsia_async::test_support

Trait MultithreadedTestResult

Source
pub trait MultithreadedTestResult: Sized {
    // Required methods
    fn run<F: 'static + Sync + Fn(usize) -> Fut, Fut: 'static + Send + Future<Output = Self>>(
        test: F,
        threads: usize,
        cfg: Config,
    ) -> Self;
    fn is_ok(&self) -> bool;
}
Expand description

Defines how to compose multiple test runs for a kind of test result in a multithreaded executor.

Required Methods§

Source

fn run<F: 'static + Sync + Fn(usize) -> Fut, Fut: 'static + Send + Future<Output = Self>>( test: F, threads: usize, cfg: Config, ) -> Self

How to repeatedly run a test with this result in a multi threaded executor.

Source

fn is_ok(&self) -> bool

Whether the result is successful.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MultithreadedTestResult for ()

Source§

fn run<F: 'static + Sync + Fn(usize) -> Fut, Fut: 'static + Send + Future<Output = Self>>( test: F, threads: usize, cfg: Config, ) -> Self

Source§

fn is_ok(&self) -> bool

Source§

impl<E: 'static + Send> MultithreadedTestResult for Result<(), E>

Source§

fn run<F: 'static + Sync + Fn(usize) -> Fut, Fut: 'static + Send + Future<Output = Self>>( test: F, threads: usize, cfg: Config, ) -> Self

Source§

fn is_ok(&self) -> bool

Implementors§