pub enum MessageData {
Broadcast {
from: Uuid,
data: Vec<u8>,
},
Send {
from: Uuid,
to: Uuid,
data: Vec<u8>,
},
ClientJoined(Uuid),
ClientLeft(Uuid),
}Expand description
A wrapper for a message being received.
This can be a broadcast (MessageData::Broadcast) or a direct message (MessageData::Send).
When a client joins or leaves, MessageData::ClientJoined and MessageData::ClientLeft are also received containing the Uuid of the client that joined or left.
Variants§
Auto Trait Implementations§
impl Freeze for MessageData
impl RefUnwindSafe for MessageData
impl Send for MessageData
impl Sync for MessageData
impl Unpin for MessageData
impl UnwindSafe for MessageData
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