2022-03-26 09:42:19 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2019-10-19 01:51:38 +00:00
|
|
|
|
2022-03-26 09:42:19 +00:00
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
|
|
|
#[serde(default)]
|
2020-07-07 22:45:32 +00:00
|
|
|
pub struct UsernameConfig<'a> {
|
|
|
|
pub format: &'a str,
|
|
|
|
pub style_root: &'a str,
|
|
|
|
pub style_user: &'a str,
|
2019-10-19 01:51:38 +00:00
|
|
|
pub show_always: bool,
|
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
impl<'a> Default for UsernameConfig<'a> {
|
|
|
|
fn default() -> Self {
|
2019-10-19 01:51:38 +00:00
|
|
|
UsernameConfig {
|
2020-09-08 16:09:21 +00:00
|
|
|
format: "[$user]($style) in ",
|
2020-07-07 22:45:32 +00:00
|
|
|
style_root: "red bold",
|
|
|
|
style_user: "yellow bold",
|
2019-10-19 01:51:38 +00:00
|
|
|
show_always: false,
|
|
|
|
disabled: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|