pub enum ToRelay {
Host {
room: Option<String>,
},
Join {
room: String,
},
Send {
to: Option<u8>,
data: Vec<u8>,
},
}Expand description
A game to the relay.
Variants§
Host
Open a room (the code it asks for, or a new one) and be its host, player 0.
Join
Join a room.
Send
Data for one player, or for every other player in the room.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToRelay
impl<'de> Deserialize<'de> for ToRelay
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
impl StructuralPartialEq for ToRelay
Auto Trait Implementations§
impl Freeze for ToRelay
impl RefUnwindSafe for ToRelay
impl Send for ToRelay
impl Sync for ToRelay
impl Unpin for ToRelay
impl UnsafeUnpin for ToRelay
impl UnwindSafe for ToRelay
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