From a74b026baa447e47aed945c12cb5383bf0fd7d23 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 23 Jul 2020 07:55:38 +0200 Subject: [PATCH] systemd/time: document CalendarEvent struct and add TODOs Signed-off-by: Thomas Lamprecht --- src/tools/systemd/time.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tools/systemd/time.rs b/src/tools/systemd/time.rs index 910e9033..430fb5c1 100644 --- a/src/tools/systemd/time.rs +++ b/src/tools/systemd/time.rs @@ -88,12 +88,27 @@ impl DateTimeValue { } } +/// Calendar events may be used to refer to one or more points in time in a +/// single expression. They are designed after the systemd.time Calendar Events +/// specification, but are not guaranteed to be 100% compatible. #[derive(Default, Debug)] pub struct CalendarEvent { + /// the days in a week this event should trigger pub days: WeekDays, + /// the second(s) this event should trigger pub second: Vec, // todo: support float values + /// the minute(s) this event should trigger pub minute: Vec, + /// the hour(s) this event should trigger pub hour: Vec, +/* FIXME: TODO + /// the day(s) in a month this event should trigger + pub day: Vec, + /// the month(s) in a year this event should trigger + pub month: Vec, + /// the years(s) this event should trigger + pub year: Vec, +*/ } #[derive(Default)]