pub struct ChatMessageEvent {
pub message: String,
pub cancelled: bool,
}Expand description
A player sent a chat message.
If cancelled, the message is not broadcast. The sender is
available via ctx.player().
Fields§
§message: StringThe chat message content.
cancelled: boolWhether this event has been cancelled by a Validate handler.
Trait Implementations§
Source§impl Clone for ChatMessageEvent
impl Clone for ChatMessageEvent
Source§fn clone(&self) -> ChatMessageEvent
fn clone(&self) -> ChatMessageEvent
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 moreSource§impl Debug for ChatMessageEvent
impl Debug for ChatMessageEvent
Source§impl Event for ChatMessageEvent
impl Event for ChatMessageEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Source§impl EventRouting for ChatMessageEvent
impl EventRouting for ChatMessageEvent
Auto Trait Implementations§
impl Freeze for ChatMessageEvent
impl RefUnwindSafe for ChatMessageEvent
impl Send for ChatMessageEvent
impl Sync for ChatMessageEvent
impl Unpin for ChatMessageEvent
impl UnsafeUnpin for ChatMessageEvent
impl UnwindSafe for ChatMessageEvent
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