aboutsummaryrefslogtreecommitdiff
path: root/src/config/memory.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/memory.rs
parente6f9ce2ed5da0eb833d548a613c3b70360c9f4b5 (diff)
parent861a986567310dfe9ccd85d2976b0ebfb683c818 (diff)
Merge pull request #38 from AdaShoelace/change-to-serde
Change to serde
Diffstat (limited to 'src/config/memory.rs')
-rw-r--r--src/config/memory.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/config/memory.rs b/src/config/memory.rs
new file mode 100644
index 0000000..19e9a31
--- /dev/null
+++ b/src/config/memory.rs
@@ -0,0 +1,19 @@
+use serde::{Deserialize, Serialize};
+use std::default::Default;
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct Memory {
+ pub icon: String,
+ pub enabled: bool,
+ pub delay: f64,
+}
+
+impl Default for Memory {
+ fn default() -> Self {
+ Memory {
+ icon: String::from(""),
+ enabled: true,
+ delay: 2.0,
+ }
+ }
+}