pub enum RxMessage {
CharacterChosen(CharacterChosen),
LightsaberChosen(LightsaberChosen),
UnitChosen(UnitChosen),
PlacementComplete(PlacementComplete),
ConnectGame(ConnectGame),
PauseRequest(PauseRequest),
HelloServer,
LeaveLobby,
Ready,
Reconnect(Reconnect),
TextMessage(TextMessage),
}Expand description
Any message that can be received from the client.
Add new messages here, without forgetting to add it to the match expression
in Self::from_str. If any fields other than messageType are necessary,
create a new struct and add it as a member of the variant. This struct must
implement Deserialize and Debug.
Variants§
CharacterChosen(CharacterChosen)
LightsaberChosen(LightsaberChosen)
UnitChosen(UnitChosen)
PlacementComplete(PlacementComplete)
ConnectGame(ConnectGame)
PauseRequest(PauseRequest)
HelloServer
LeaveLobby
Ready
Reconnect(Reconnect)
TextMessage(TextMessage)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RxMessage
impl<'de> Deserialize<'de> for RxMessage
Source§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
Auto Trait Implementations§
impl Freeze for RxMessage
impl RefUnwindSafe for RxMessage
impl Send for RxMessage
impl Sync for RxMessage
impl Unpin for RxMessage
impl UnwindSafe for RxMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more