diff options
author | Hendrik Sollich <hendrik@hoodie.de> | 2016-11-20 22:09:13 +0100 |
---|---|---|
committer | Hendrik Sollich <hendrik@hoodie.de> | 2016-11-20 22:09:13 +0100 |
commit | 8ab91ec816df6ecb132dc79145e8487fe2a777f9 (patch) | |
tree | a1d593fe4152ae69508a1bee7acc4b98c3bdf52a | |
parent | 9a9671ec4cff2aa37e46356f1e0dd6382b928eba (diff) |
added Component::location()
-rw-r--r-- | src/components.rs | 11 |
1 files 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<R:Repeater+?Sized>(&mut self, repeat: R) -> &mut Self { // unimplemented!() //} + } @@ -52,6 +52,7 @@ impl Todo { //pub fn repeats<R:Repeater+?Sized>(&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()) |