From 861a986567310dfe9ccd85d2976b0ebfb683c818 Mon Sep 17 00:00:00 2001 From: AdaShoelace Date: Thu, 21 Jan 2021 22:24:15 +0100 Subject: Change to serde Change config serializer to serde in order to get cleaner config types. --- src/config/spotify.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/config/spotify.rs (limited to 'src/config/spotify.rs') diff --git a/src/config/spotify.rs b/src/config/spotify.rs new file mode 100644 index 0000000..7cdcd2c --- /dev/null +++ b/src/config/spotify.rs @@ -0,0 +1,19 @@ +use serde::{Deserialize, Serialize}; +use std::default::Default; + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct Spotify { + pub icon: String, + pub enabled: bool, + pub delay: f64, +} + +impl Default for Spotify { + fn default() -> Self { + Spotify { + icon: String::from(""), + enabled: false, + delay: 15.0, + } + } +} -- cgit v1.2.3