Enum caesar_core::relay::ResponsePacket
source · pub enum ResponsePacket {
Join {
size: Option<usize>,
},
Create {
id: String,
},
Leave {
index: usize,
},
Error {
message: String,
},
}Expand description
Represents a packet sent by the server to the client.
The type field is used to determine the type of the packet. It can be one of the following
values:
Join: The client has joined a room.Create: The client has created a new room.Leave: The client has left the current room.Error: There was an error.
Variants§
Join
The client has joined a room.
The size field is an optional field that specifies the size of the room. If it is None,
the size is unknown.
Create
The client has created a new room.
The id field is the ID of the new room.
Leave
The client has left the current room.
The index field is the index of the client in the room.
Error
There was an error.
The message field is the error message.
Trait Implementations§
source§impl Debug for ResponsePacket
impl Debug for ResponsePacket
source§impl<'de> Deserialize<'de> for ResponsePacket
impl<'de> Deserialize<'de> for ResponsePacket
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 ResponsePacket
impl RefUnwindSafe for ResponsePacket
impl Send for ResponsePacket
impl Sync for ResponsePacket
impl Unpin for ResponsePacket
impl UnwindSafe for ResponsePacket
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