diff options
author | Hendrik Sollich <hendrik@hoodie.de> | 2017-01-10 00:17:22 +0100 |
---|---|---|
committer | Hendrik Sollich <hendrik@hoodie.de> | 2017-01-10 00:17:22 +0100 |
commit | dad2ecfce4c53fa07579cce656154c7cd7640aaa (patch) | |
tree | 1b769b44ca0180c4eb2f70bd93e82bd45cd8155e | |
parent | 3b5da1d2cdd96ee2ef9061a3d9865284d6914755 (diff) |
added VTODO interface
-rw-r--r-- | examples/tasks.rs | 1 | ||||
-rw-r--r-- | src/components.rs | 9 | ||||
-rw-r--r-- | src/properties.rs | 26 |
3 files changed, 32 insertions, 4 deletions
diff --git a/examples/tasks.rs b/examples/tasks.rs index 54e5c81..da17db8 100644 --- a/examples/tasks.rs +++ b/examples/tasks.rs @@ -14,6 +14,7 @@ fn main(){ .status(TodoStatus::Completed) .completed(Local::now()) .due(Local::now()) + .due(Local::now()) .done(); println!("{}", todo.to_string()); diff --git a/src/components.rs b/src/components.rs index 69f8143..8e9b3fa 100644 --- a/src/components.rs +++ b/src/components.rs @@ -249,10 +249,11 @@ pub trait Component { self.add_property("DESCRIPTION", desc) } - /// Set the description - fn attendee(&mut self, desc: &str) -> &mut Self { - self.add_multi_property("ATTENDEE", desc) // multi_properties should be a multimap - } + ///// Set the description + ///// TODO `Attendee` needs to be its own type + //fn attendee(&mut self, desc: &str) -> &mut Self { + // self.add_multi_property("ATTENDEE", desc) // multi_properties should be a multimap + //} /// Set the LOCATION /// 3.8.1.7. Location diff --git a/src/properties.rs b/src/properties.rs index c12ee89..8348cb5 100644 --- a/src/properties.rs +++ b/src/properties.rs @@ -229,3 +229,29 @@ impl Into<Property> for TodoStatus { } } +//pub enum AttendeeRole { +// /// CHAIR (RFC 5545, Section 3.2.16) +// Chair, +// +// /// REQ-PARTICIPANT (RFC 5545, Section 3.2.16) +// ReqParticipant, +// +// /// OPT-PARTICIPANT (RFC 5545, Section 3.2.16) +// OptParticipant, +// +// /// NON-PARTICIPANT (RFC 5545, Section 3.2.16) +// NonParticipant +//} +// +//pub struct Attendee { +// cn: String, +// role: AttendeeRole, +// delegated_from: String, +// partstat: String, +// sent_by: String, +// dir: String, +//} +// +//impl Into<Property> for Attendee { +//} + |