aboutsummaryrefslogtreecommitdiff
path: root/src/config/mpd.rs
diff options
context:
space:
mode:
authorMustafa Salih <37256744+MustafaSalih1993@users.noreply.github.com>2021-01-22 00:53:11 +0300
committerGitHub <noreply@github.com>2021-01-22 00:53:11 +0300
commit9525a1075199d5fd202d1744dc502ff5a766aa99 (patch)
tree65ec9c5397bf7de009f3484ea161e77df2120f67 /src/config/mpd.rs
parente6f9ce2ed5da0eb833d548a613c3b70360c9f4b5 (diff)
parent861a986567310dfe9ccd85d2976b0ebfb683c818 (diff)
Merge pull request #38 from AdaShoelace/change-to-serde
Change to serde
Diffstat (limited to 'src/config/mpd.rs')
-rw-r--r--src/config/mpd.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/config/mpd.rs b/src/config/mpd.rs
new file mode 100644
index 0000000..15c9c1b
--- /dev/null
+++ b/src/config/mpd.rs
@@ -0,0 +1,23 @@
+use serde::{Deserialize, Serialize};
+use std::default::Default;
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct Mpd {
+ pub icon: String,
+ pub host: String,
+ pub port: String,
+ pub enabled: bool,
+ pub delay: f64,
+}
+
+impl Default for Mpd {
+ fn default() -> Self {
+ Mpd {
+ icon: String::from(""),
+ host: String::from("127.0.0.1"),
+ port: String::from("6600"),
+ enabled: false,
+ delay: 15.0,
+ }
+ }
+}