Struct GameTestDefinition
#[non_exhaustive]pub struct GameTestDefinition {
pub structure: String,
pub function: String,
pub environment: String,
pub dimension: String,
pub max_ticks: i32,
pub setup_ticks: i32,
pub max_attempts: i32,
pub required_successes: i32,
pub required: bool,
}Expand description
Metadata for a function test added to the world’s test-instance registry.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.structure: StringStructure template to place.
function: StringRegistered function identifier.
environment: StringEnvironment definition selected by the runner.
dimension: StringServer dimension in which to run.
max_ticks: i32Timeout in ticks.
setup_ticks: i32Delay before invoking the function.
max_attempts: i32Maximum attempts.
required_successes: i32Number of successful attempts required.
required: boolWhether failure counts as a required failure.
Implementations§
§impl GameTestDefinition
impl GameTestDefinition
pub fn new(structure: String, function: String) -> GameTestDefinition
pub fn new(structure: String, function: String) -> GameTestDefinition
A required test with a 100-tick timeout, no setup delay and one attempt.
Trait Implementations§
§impl Clone for GameTestDefinition
impl Clone for GameTestDefinition
§fn clone(&self) -> GameTestDefinition
fn clone(&self) -> GameTestDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for GameTestDefinition
impl Debug for GameTestDefinition
Auto Trait Implementations§
impl Freeze for GameTestDefinition
impl RefUnwindSafe for GameTestDefinition
impl Send for GameTestDefinition
impl Sync for GameTestDefinition
impl Unpin for GameTestDefinition
impl UnsafeUnpin for GameTestDefinition
impl UnwindSafe for GameTestDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more