aboutsummaryrefslogtreecommitdiff
path: root/src/config/spotify.rs
diff options
context:
space:
mode:
authorAdaShoelace <adashoelace@gmail.com>2021-01-21 22:24:15 +0100
committerAdaShoelace <adashoelace@gmail.com>2021-01-21 22:24:15 +0100
commit861a986567310dfe9ccd85d2976b0ebfb683c818 (patch)
tree65ec9c5397bf7de009f3484ea161e77df2120f67 /src/config/spotify.rs
parente6f9ce2ed5da0eb833d548a613c3b70360c9f4b5 (diff)
Change to serde
Change config serializer to serde in order to get cleaner config types.
Diffstat (limited to 'src/config/spotify.rs')
-rw-r--r--src/config/spotify.rs19
1 files changed, 19 insertions, 0 deletions
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,
+ }
+ }
+}