pub trait AsyncTestContext
where Self: Sized,
{ // Required method fn setup() -> impl Future<Output = Self> + Send; // Provided method fn teardown(self) -> impl Future<Output = ()> + Send { ... } }
Expand description

The trait to implement to get setup/teardown functionality for async tests.

Required Methods§

source

fn setup() -> impl Future<Output = Self> + Send

Create the context. This is run once before each test that uses the context.

Provided Methods§

source

fn teardown(self) -> impl Future<Output = ()> + Send

Perform any additional cleanup of the context besides that already provided by normal “drop” semantics.

Object Safety§

This trait is not object safe.

Implementors§