pub struct MessagesConfig {
pub enabled: bool,
pub join_msg: String,
pub leave_msg: String,
pub kick_msg: String,
}Expand description
Configuration for the messages module.
Fields§
§enabled: boolWhether this module is active.
join_msg: StringMessage broadcast when a player joins. Use {player} as a placeholder for the player’s name. Leave empty to disable.
leave_msg: StringMessage broadcast when a player leaves. Use {player} as a placeholder for the player’s name. Leave empty to disable.
kick_msg: StringMessage shown to the player when they are kicked during login. Use {player} as a placeholder for the player’s name. Leave empty to disable.
Trait Implementations§
Source§impl Clone for MessagesConfig
impl Clone for MessagesConfig
Source§fn clone(&self) -> MessagesConfig
fn clone(&self) -> MessagesConfig
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 MessagesConfig
impl Debug for MessagesConfig
Source§impl Default for MessagesConfig
impl Default for MessagesConfig
Source§fn default() -> MessagesConfig
fn default() -> MessagesConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessagesConfig
impl<'de> Deserialize<'de> for MessagesConfig
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 MessagesConfig
impl RefUnwindSafe for MessagesConfig
impl Send for MessagesConfig
impl Sync for MessagesConfig
impl Unpin for MessagesConfig
impl UnsafeUnpin for MessagesConfig
impl UnwindSafe for MessagesConfig
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