pub struct GameInput {
    pub frame: Frame,
    pub size: usize,
    pub buffer: Vec<u8>,
}
Expand description

Represents a serialized input for a single player in a single frame. This struct holds a data which represents the encoded input of a single player. The associated frame is denoted with frame. You do not need to create this struct, but the sessions will provide a Vec<GameInput> for you during advance_frame().

Fields

frame: Frame

The frame to which this info belongs to. -1/NULL_FRAME represents an invalid frame

size: usizebuffer: Vec<u8>

An input buffer that will hold input data

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.