2022-03-26 09:42:19 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2019-10-10 08:21:52 +00:00
|
|
|
|
2022-03-26 09:42:19 +00:00
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
2022-09-09 12:59:38 +00:00
|
|
|
#[cfg_attr(
|
|
|
|
feature = "config-schema",
|
|
|
|
derive(schemars::JsonSchema),
|
|
|
|
schemars(deny_unknown_fields)
|
|
|
|
)]
|
2022-03-26 09:42:19 +00:00
|
|
|
#[serde(default)]
|
2019-10-10 08:21:52 +00:00
|
|
|
pub struct JobsConfig<'a> {
|
|
|
|
pub threshold: i64,
|
2021-08-14 13:29:25 +00:00
|
|
|
pub symbol_threshold: i64,
|
|
|
|
pub number_threshold: i64,
|
2020-07-07 22:45:32 +00:00
|
|
|
pub format: &'a str,
|
|
|
|
pub symbol: &'a str,
|
|
|
|
pub style: &'a str,
|
2019-10-10 08:21:52 +00:00
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
impl<'a> Default for JobsConfig<'a> {
|
|
|
|
fn default() -> Self {
|
2019-10-10 08:21:52 +00:00
|
|
|
JobsConfig {
|
|
|
|
threshold: 1,
|
2021-08-14 13:29:25 +00:00
|
|
|
symbol_threshold: 1,
|
|
|
|
number_threshold: 2,
|
2020-07-07 22:45:32 +00:00
|
|
|
format: "[$symbol$number]($style) ",
|
|
|
|
symbol: "✦",
|
|
|
|
style: "bold blue",
|
2019-10-10 08:21:52 +00:00
|
|
|
disabled: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|