Enum caesar_core::relay::RequestPacket
source · pub enum RequestPacket {
Join {
id: String,
},
Create {
id: Option<String>,
},
Leave,
}Expand description
Represents a packet sent by a client to the server.
The type field is used to determine the type of the packet. It can be one of the following
values:
Join: The client wants to join a room.Create: The client wants to create a new room.Leave: The client wants to leave the current room.
Variants§
Join
The client wants to join a room.
The id field is the ID of the room that the client wants to join.
Create
The client wants to create a new room.
The id field is an optional field that specifies the ID of the new room. If it is None,
a random ID will be generated.
Leave
The client wants to leave the current room.
Trait Implementations§
source§impl Debug for RequestPacket
impl Debug for RequestPacket
source§impl<'de> Deserialize<'de> for RequestPacket
impl<'de> Deserialize<'de> for RequestPacket
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 RequestPacket
impl RefUnwindSafe for RequestPacket
impl Send for RequestPacket
impl Sync for RequestPacket
impl Unpin for RequestPacket
impl UnwindSafe for RequestPacket
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