use serde::{Deserialize, Serialize}; pub const fn enabled() -> bool { false } pub const fn url() -> Option { None } pub const fn username() -> Option { None } pub const fn password() -> Option { None } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { #[serde(default = "enabled")] pub enabled: bool, #[serde(default = "url")] pub url: Option, #[serde(default = "username")] pub username: Option, #[serde(default = "password")] pub password: Option, } impl Default for Config { fn default() -> Self { Config { enabled: enabled(), url: url(), username: username(), password: password(), } } }