Skip to main content

Request

Enum Request 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Hello

The first line: the build’s token, and the link’s version the client speaks.

Fields

§token: String

The token the build logged when it started listening.

§link: u32

The client’s VERSION.

§

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.

Fields

§steps: Vec<Step>

The steps, in order.

§

Log

The log’s kept lines numbered since or more.

Fields

§since: u64

The first line’s number: 0, the default, for every kept line; the last answer’s next for the lines since.

§

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: u64

The first record’s number: 0, the default, for every kept record; the last answer’s next for the records since.

§max: u32

The most records to answer, 1 to PERF_FRAMES; PERF_MAX by default.

§snapshot: bool

Whether the backend takes a heap snapshot after this frame (App::heap_snapshot) and answers it with the records.

Implementations§

Source§

impl Request

Source

pub fn to_line(&self) -> String

The request as one line, with no line break.

Trait Implementations§

Source§

impl Clone for Request

Source§

fn clone(&self) -> Request

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Request

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Request

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Request

Source§

fn eq(&self, other: &Request) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Request

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Request

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.