pub struct SyncTestSession<T> where
    T: Config
{ /* private fields */ }
Expand description

During a SyncTestSession, GGRS will simulate a rollback every frame and resimulate the last n states, where n is the given check distance. The resimulated checksums will be compared with the original checksums and report if there was a mismatch.

Implementations

Registers local input for a player for the current frame. This should be successfully called for every local player before calling advance_frame(). If this is called multiple times for the same player before advancing the frame, older given inputs will be overwritten. In a sync test, all players are considered to be local, so you need to add input for all of them.

Errors
  • Returns InvalidRequest when the given handle is not valid (i.e. not between 0 and num_players).

In a sync test, this will advance the state by a single frame and afterwards rollback check_distance amount of frames, resimulate and compare checksums with the original states. Returns an order-sensitive Vec<GGRSRequest>. You should fulfill all requests in the exact order they are provided. Failure to do so will cause panics later.

Errors
  • Returns MismatchedChecksumError if checksums don’t match after resimulation.

Returns the number of players this session was constructed with.

Returns the maximum prediction window of a session.

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.