Skip to main content

Env

Trait Env 

Source
pub trait Env:
    Deref<Target = Core>
    + Send
    + Sync
    + Sized
    + 'static {
    // Required methods
    fn start(suite: &'static str) -> impl Future<Output = Result<Self>>;
    fn shutdown(&self) -> impl Future<Output = ()>;
}
Expand description

The environment of one suite: started once, before the first test that needs it, shared by all the tests of the suite and shut down after the last one.

Implementations can write async fn for both methods.

Required Methods§

Source

fn start(suite: &'static str) -> impl Future<Output = Result<Self>>

Source

fn shutdown(&self) -> impl Future<Output = ()>

Stops what start started. The process exits right after it, without running destructors, so a container left here stays running.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§