Trait Messages
pub trait Messages {
// Provided methods
fn text_allowed(&self, text: &str) -> Option<bool> { ... }
fn broadcast(&self, line: Text) -> Result<(), TextFormError> { ... }
}Expand description
The messages service, reached through its host.
Provided Methods§
fn text_allowed(&self, text: &str) -> Option<bool>
fn text_allowed(&self, text: &str) -> Option<bool>
Side: server.
Whether the server’s chat filter (server.toml [chat_filter])
lets text through: true without a filter, None inside a player’s
hook (where the server is out of reach).
fn broadcast(&self, line: Text) -> Result<(), TextFormError>
fn broadcast(&self, line: Text) -> Result<(), TextFormError>
Side: server. A system line in every player’s chat and the server’s log. Refuses text deeper than 512 component nodes before applying any changes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".