Enum aper::StateUpdateMessage[][src]

pub enum StateUpdateMessage<State: StateProgram> {
    ReplaceState(State, Timestamp, PlayerID),
    TransitionState(TransitionEvent<State::T>),
}
Expand description

A message from the server to a client that tells it to update its state.

Variants

ReplaceState

Instructs the client to completely discard its existing state and replace it with the provided one. This is currently only used to set the initial state when a client first connects.

Tuple Fields of ReplaceState

0: State1: Timestamp2: PlayerID
TransitionState

Instructs the client to apply the given TransitionEvent to its copy of the state to synchronize it with the server. All state updates after the initial state is sent are sent through StateUpdateMessage::TransitionState.

Tuple Fields of TransitionState

0: TransitionEvent<State::T>

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

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 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.