From 8ab91ec816df6ecb132dc79145e8487fe2a777f9 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Sun, 20 Nov 2016 22:09:13 +0100 Subject: added Component::location() --- src/components.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components.rs b/src/components.rs index e574b8b..eddcaeb 100644 --- a/src/components.rs +++ b/src/components.rs @@ -29,10 +29,10 @@ impl Event { Event { properties: mem::replace(&mut self.properties, HashMap::new()) } } - //pub fn repeats(&mut self, repeat: R) -> &mut Self { // unimplemented!() //} + } @@ -52,6 +52,7 @@ impl Todo { //pub fn repeats(&mut self, repeat: R) -> &mut Self { // unimplemented!() //} + } @@ -153,7 +154,6 @@ pub trait Component { self } - /// Prints to stdout fn print(&self) -> Result<(), fmt::Error> { let mut out = String::new(); @@ -172,6 +172,13 @@ pub trait Component { self.add_property("DESCRIPTION", desc) } + /// Set the LOCATION + /// 3.8.1.7. Location + fn location(&mut self, location: &str) -> &mut Self { + self.add_property("LOCATION", location); + self + } + /// Set the visibility class fn class(&mut self, class: Class) -> &mut Self { self.append_property(class.into()) -- cgit v1.2.3