pub enum ClientPacket {
Hello {
username: String,
},
SendMessage {
text: String,
},
Ping,
JoinRoom {
room: String,
},
ListRooms,
}Expand description
Client-to-server protocol packets.
Variants§
Hello
Initial handshake packet sent by client after connecting.
SendMessage
Chat message sent by a client.
Ping
Heartbeat ping.
JoinRoom
Request to join or create a room.
ListRooms
Request the list of all known rooms.
Trait Implementations§
Source§impl Clone for ClientPacket
impl Clone for ClientPacket
Source§fn clone(&self) -> ClientPacket
fn clone(&self) -> ClientPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientPacket
impl Debug for ClientPacket
Source§impl<'de> Deserialize<'de> for ClientPacket
impl<'de> Deserialize<'de> for ClientPacket
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
Source§impl PartialEq for ClientPacket
impl PartialEq for ClientPacket
Source§impl Serialize for ClientPacket
impl Serialize for ClientPacket
impl Eq for ClientPacket
impl StructuralPartialEq for ClientPacket
Auto Trait Implementations§
impl Freeze for ClientPacket
impl RefUnwindSafe for ClientPacket
impl Send for ClientPacket
impl Sync for ClientPacket
impl Unpin for ClientPacket
impl UnsafeUnpin for ClientPacket
impl UnwindSafe for ClientPacket
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