pub enum GGRSRequest<T> where
    T: Config
{ SaveGameState { cell: GameStateCell<T::State>, frame: Frame, }, LoadGameState { cell: GameStateCell<T::State>, frame: Frame, }, AdvanceFrame { inputs: Vec<(T::Input, InputStatus)>, }, }
Expand description

Requests that you can receive from the session. Handling them is mandatory.

Variants

SaveGameState

Fields

cell: GameStateCell<T::State>

Use cell.save(...) to save your state.

frame: Frame

The given frame is a sanity check: The gamestate you save should be from that frame.

You should save the current gamestate in the cell provided to you. The given frame is a sanity check: The gamestate you save should be from that frame.

LoadGameState

Fields

cell: GameStateCell<T::State>

Use cell.load() to load your state.

frame: Frame

The given frame is a sanity check: The gamestate you load is from that frame.

You should load the gamestate in the cell provided to you. The given ‘frame’ is a sanity check: The gamestate you load should be from that frame.

AdvanceFrame

Fields

inputs: Vec<(T::Input, InputStatus)>

Contains inputs and input status for each player.

You should advance the gamestate with the inputs provided to you. Disconnected players are indicated by having NULL_FRAME instead of the correct current frame in their input.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.