#[non_exhaustive]pub struct RunInput {
pub start: Vec<GameArg>,
pub script: Script,
pub frames: u32,
pub perf: bool,
pub perf_out: Option<String>,
pub session: Option<SessionInput>,
pub path: Option<String>,
pub shape: bool,
}Expand description
What run and scene play.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start: Vec<GameArg>The game’s own start options (frame-png --help lists them), in
the order given.
script: ScriptThe steps to play.
frames: u32Frames to run after the script with no input.
perf: boolMeasure each frame, and answer a summary of the times (run only).
perf_out: Option<String>Also write every kept frame’s record there, a JSON line each; a
relative path is from the project’s folder. It implies perf.
session: Option<SessionInput>Start from this session record, played to its end, in place of the
start options: the game’s real start is the record’s. A frame that
plays differently stops it there, and the script and frames don’t
play.
path: Option<String>Answer only the value at this JSON Pointer (RFC 6901) in the
scene’s data, /hero/x (scene only).
shape: boolAnswer the JSON Schema of the scene’s data, as the game derived it
(scene only).
Implementations§
Source§impl RunInput
impl RunInput
Sourcepub fn check(&self) -> Result<(), String>
pub fn check(&self) -> Result<(), String>
Whether the Harness can play it: every step of its script
(frame_png::check), at most MAX_IDLE_FRAMES frames after, and
no start options with a session record, whose start is the game’s
real one. Its actions’ names are the game’s to check
(check_actions).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunInput
impl<'de> Deserialize<'de> for RunInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for RunInput
impl JsonSchema for RunInput
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more