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
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.
TransitionState(TransitionEvent<State::T>)
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more