summaryrefslogtreecommitdiffstats
path: root/libimagdiary
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-06-07 20:16:05 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-06-08 13:59:41 +0200
commitb04b6e3d2447a525cd5ff9efb71348605ca82915 (patch)
tree785f77f2a8c3cd86a176fddbeabf4bbe06d68c0c /libimagdiary
parentdc07abdd72f56997d1e582dea530a004def4bb00 (diff)
Add setters for DiaryId type
Diffstat (limited to 'libimagdiary')
-rw-r--r--libimagdiary/src/diaryid.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/libimagdiary/src/diaryid.rs b/libimagdiary/src/diaryid.rs
index c2066506..3ca7db96 100644
--- a/libimagdiary/src/diaryid.rs
+++ b/libimagdiary/src/diaryid.rs
@@ -62,6 +62,36 @@ impl DiaryId {
self.minute
}
+ pub fn with_diary_name(mut self, name: String) -> DiaryId {
+ self.name = name;
+ self
+ }
+
+ pub fn with_year(mut self, year: i32) -> DiaryId {
+ self.year = year;
+ self
+ }
+
+ pub fn with_month(mut self, month: u32) -> DiaryId {
+ self.month = month;
+ self
+ }
+
+ pub fn with_day(mut self, day: u32) -> DiaryId {
+ self.day = day;
+ self
+ }
+
+ pub fn with_hour(mut self, hour: u32) -> DiaryId {
+ self.hour = hour;
+ self
+ }
+
+ pub fn with_minute(mut self, minute: u32) -> DiaryId {
+ self.minute = minute;
+ self
+ }
+
}
impl IntoStoreId for DiaryId {