pub enum ServerEvent {
Joined {
client_id: Uuid,
room_id: String,
},
PlayerJoined {
client_id: Uuid,
},
PlayerLeft {
client_id: Uuid,
},
Error(String),
Broadcast {
sender_id: Uuid,
data: Bytes,
},
EchoTest {
data: Bytes,
},
}Expand description
Client-facing event (clean API over [ServerWire])
Events the client receives from the server.
Variants§
Joined
Room join confirmed.
PlayerJoined
Another player joined your room.
PlayerLeft
Another player left your room.
Error(String)
Server error.
Broadcast
Relayed data from a peer.
EchoTest
Health Echo Check from server
Fields
§
data: BytesTrait Implementations§
Auto Trait Implementations§
impl !Freeze for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnwindSafe for ServerEvent
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