Skip to main content

GameTestFunction

Trait GameTestFunction 

pub trait GameTestFunction: Send + Sync {
    // Required method
    fn run(
        &self,
        host: &mut dyn ServerHost,
        context: &GameTestContext,
    ) -> GameTestResult;
}
Expand description

A function run once at the start of each attempt, with the owning server level.

Required Methods§

fn run( &self, host: &mut dyn ServerHost, context: &GameTestContext, ) -> GameTestResult

Return an outcome; the runner owns retries, timeouts and completion.

Trait Implementations§

§

impl Wire for Box<dyn GameTestFunction>

§

const MIN: usize = 8

Minimum encoded size, used to reject impossible collection lengths.
§

fn put(&self, out: &mut Writer)

Encodes this value, recording failures on the writer.
§

fn put_owned(self, out: &mut Writer)

Consumes owned data when a resource’s ownership must cross the boundary.
§

fn take(input: &mut Reader<'_>) -> Result<Box<dyn GameTestFunction>, WireError>

Decodes one value, leaving any following bytes for the caller.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§