summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml1
-rw-r--r--src/lib.rs1
-rw-r--r--src/options.rs3
3 files changed, 4 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 3767b93..414aa81 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,3 +16,4 @@ chrono = "0.4.19"
chrono-tz = "0.5.3"
lazy_static = "1.4.0"
regex = "1.4.1"
+serde = {version = "1.0", features = ["derive"]} \ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs
index af5fd29..ba4aedc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -193,6 +193,7 @@
extern crate chrono;
extern crate chrono_tz;
extern crate regex;
+extern crate serde;
#[macro_use]
extern crate lazy_static;
diff --git a/src/options.rs b/src/options.rs
index 4e6f1cd..0863294 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -1,11 +1,12 @@
use crate::datetime::{get_weekday_val, DTime};
use crate::parse_options::parse_options;
use chrono::prelude::*;
+use serde::{Serialize, Deserialize};
use chrono_tz::{Tz, UTC};
use std::error::Error;
use std::fmt::{Display, Formatter};
-#[derive(Debug, PartialEq, PartialOrd, Clone)]
+#[derive(Serialize, Deserialize, Debug, PartialEq, PartialOrd, Clone)]
pub enum Frequenzy {
Yearly = 0,
Monthly = 1,