Trait GameTests
pub trait GameTests {
// Required methods
fn register_test(
&mut self,
id: &str,
definition: GameTestDefinition,
) -> Result<(), &'static str>;
fn register(
&mut self,
id: &str,
function: Arc<dyn GameTestFunction>,
) -> Result<(), &'static str>;
}Expand description
Registration service supplied to the registration hook.
Required Methods§
fn register_test(
&mut self,
id: &str,
definition: GameTestDefinition,
) -> Result<(), &'static str>
fn register_test( &mut self, id: &str, definition: GameTestDefinition, ) -> Result<(), &'static str>
Register a test instance; duplicate ids and invalid timing are refused.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".