aboutsummaryrefslogtreecommitdiff
path: root/src/habit/prelude.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-12 15:57:35 +0100
committerAkshay <[email protected]>2020-07-12 15:57:35 +0100
commite4e05dd72187c22d7c51b216a16b6bb5d7e88572 (patch)
tree854f6dcb731c80897afc19a2daf1e78346a66afc /src/habit/prelude.rs
parent0abafde050a5cabaedb189e4cb7c77a7f14c11d3 (diff)
refactor habit.rs into habit module
Diffstat (limited to 'src/habit/prelude.rs')
-rw-r--r--src/habit/prelude.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/habit/prelude.rs b/src/habit/prelude.rs
new file mode 100644
index 0000000..9196f00
--- /dev/null
+++ b/src/habit/prelude.rs
@@ -0,0 +1,20 @@
1use serde::{Deserialize, Serialize};
2
3pub enum TrackEvent {
4 Increment,
5 Decrement,
6}
7
8#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
9pub enum ViewMode {
10 Day,
11 Week,
12 Month,
13 Year,
14}
15
16impl std::default::Default for ViewMode {
17 fn default() -> Self {
18 ViewMode::Day
19 }
20}