#[non_exhaustive]pub enum Request {
Hello {
token: String,
link: u32,
},
Status,
Frame,
Screenshot,
Play {
steps: Vec<Step>,
},
Log {
since: u64,
},
Perf {
since: u64,
max: u32,
snapshot: bool,
},
}Expand description
A line a client sends, tagged by op.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Hello
The first line: the build’s token, and the link’s version the client speaks.
Fields
Status
Where the build is: Status.
Frame
The frame as text, in the snapshot format.
Screenshot
The window’s picture, as a PNG, after the next frame is shown.
Play
Steps played as a player’s input, frame by frame: answered when
the last has run. A wait’s seconds are the build’s frames at 60 a
second (script::wait_frames); a crank isn’t played over the
link yet.
Log
The log’s kept lines numbered since or more.
Fields
Perf
The frames’ records numbered since or more (App::perf), the
first max of them, and a heap snapshot after this frame if asked.
Fields
since: u64The first record’s number: 0, the default, for every kept
record; the last answer’s next for the records since.
max: u32The most records to answer, 1 to PERF_FRAMES;
PERF_MAX by default.
snapshot: boolWhether the backend takes a heap snapshot after this frame
(App::heap_snapshot) and answers it with the records.