Enum caesar_core::shared::JsonPacket
source · pub enum JsonPacket {
Join {
id: String,
},
Create {
id: Option<String>,
},
Leave,
}Expand description
Represents a packet that is sent over a websocket connection.
This enum is used to represent different types of packets that can be sent over a websocket connection.
Variants§
Join
A packet to join a room.
This variant is used to request to join a room. The id field is used to specify the room id.
Create
A packet to create a new room.
This variant is used to request to create a new room. The id field is used to specify the room id, which can be optional.
Leave
A packet to leave a room.
This variant is used to request to leave a room.
Trait Implementations§
source§impl Debug for JsonPacket
impl Debug for JsonPacket
source§impl<'de> Deserialize<'de> for JsonPacket
impl<'de> Deserialize<'de> for JsonPacket
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 JsonPacket
impl RefUnwindSafe for JsonPacket
impl Send for JsonPacket
impl Sync for JsonPacket
impl Unpin for JsonPacket
impl UnwindSafe for JsonPacket
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