pub enum WireEvent {
Ping {
tick: u64,
},
Pong {
tick: u64,
},
Auth {
session_token: String,
},
Fragment(FragmentedEvent),
StressTest {
count: u16,
rotate: bool,
},
Spawn {
entity_type: u16,
x: f32,
y: f32,
rot: f32,
},
ClearWorld,
GameEvent(GameEvent),
}Expand description
A restricted view of NetworkEvent for over-the-wire transport.
Prevents local-only variants (like ClientConnected) from being sent/received.
Variants§
Ping
A heartbeat ping.
Pong
A heartbeat pong.
Auth
A session authentication request.
Fragment(FragmentedEvent)
A fragment of a larger message.
StressTest
A testing command to trigger a stress test.
Spawn
A testing command to spawn a specific entity.
Fields
ClearWorld
A command to clear all entities from the world.
GameEvent(GameEvent)
A discrete game event.
Implementations§
Source§impl WireEvent
impl WireEvent
Sourcepub fn into_network_event(self, client_id: ClientId) -> NetworkEvent
pub fn into_network_event(self, client_id: ClientId) -> NetworkEvent
Converts a WireEvent into a NetworkEvent for a specific client context.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WireEvent
impl<'de> Deserialize<'de> for WireEvent
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 WireEvent
Auto Trait Implementations§
impl Freeze for WireEvent
impl RefUnwindSafe for WireEvent
impl Send for WireEvent
impl Sync for WireEvent
impl Unpin for WireEvent
impl UnsafeUnpin for WireEvent
impl UnwindSafe for WireEvent
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