pub enum MineChatMessage {
Auth {
payload: AuthPayload,
},
AuthAck {
payload: AuthAckPayload,
},
Chat {
payload: ChatPayload,
},
Broadcast {
payload: BroadcastPayload,
},
Disconnect {
payload: DisconnectPayload,
},
}
Expand description
The different types of messages that can be sent and received in the MineChat protocol.
Variants§
Auth
An authentication message, containing the client’s UUID and link code.
Fields
§
payload: AuthPayload
AuthAck
An acknowledgment of a successful authentication, containing the server’s response.
Fields
§
payload: AuthAckPayload
Chat
A chat message, containing the message text.
Fields
§
payload: ChatPayload
Broadcast
A broadcast message, containing the message text and the sender’s name.
Fields
§
payload: BroadcastPayload
Disconnect
A disconnect message, containing the reason for the disconnection.
Fields
§
payload: DisconnectPayload
Trait Implementations§
Source§impl Debug for MineChatMessage
impl Debug for MineChatMessage
Source§impl<'de> Deserialize<'de> for MineChatMessage
impl<'de> Deserialize<'de> for MineChatMessage
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 MineChatMessage
impl RefUnwindSafe for MineChatMessage
impl Send for MineChatMessage
impl Sync for MineChatMessage
impl Unpin for MineChatMessage
impl UnwindSafe for MineChatMessage
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