pub enum BroadcastMessage {
Chat(String),
PlayerJoinedInfo(PlayerJoinInfo),
PlayerLeft(u128),
Shutdown,
}Expand description
BroadcastMessage gets broadcasted from the server thread to all the plot threads.
This happens when there is a chat message, a player joins or leaves, or the server
shuts down.
Variants§
Chat(String)
This message is broadcasted for chat messages. It contains the raw json data to send to the clients.
PlayerJoinedInfo(PlayerJoinInfo)
This message is broadcasted when a player joins the server. It is used to update the tab-list on all connected clients.
PlayerLeft(u128)
This message is broadcasted when a player leaves the server. It is used to update the tab-list on all connected clients.
Shutdown
This message is broadcasted when the server is stopping, either through the stop command or through the ctrl+c handler.
Trait Implementations§
Source§impl Clone for BroadcastMessage
impl Clone for BroadcastMessage
Source§fn clone(&self) -> BroadcastMessage
fn clone(&self) -> BroadcastMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BroadcastMessage
impl RefUnwindSafe for BroadcastMessage
impl Send for BroadcastMessage
impl Sync for BroadcastMessage
impl Unpin for BroadcastMessage
impl UnsafeUnpin for BroadcastMessage
impl UnwindSafe for BroadcastMessage
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