summaryrefslogtreecommitdiffstats
path: root/src/icalwrap
diff options
context:
space:
mode:
authorNora <nora.widdecke@tu-bs.de>2019-01-13 02:54:30 +0100
committerNora <nora.widdecke@tu-bs.de>2019-01-13 02:54:30 +0100
commitc475991617ca9c98fb280191878c79c3b783bc5f (patch)
tree813cdf9f8d7542c836c189dfaa0f68f4c07b2fec /src/icalwrap
parent0c54bb32d7b11ea5e42992e52d6428baee585f9f (diff)
icalvcalendar: add function with_path
Diffstat (limited to 'src/icalwrap')
-rw-r--r--src/icalwrap/icalvcalendar.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/icalwrap/icalvcalendar.rs b/src/icalwrap/icalvcalendar.rs
index dd6a5af..2336829 100644
--- a/src/icalwrap/icalvcalendar.rs
+++ b/src/icalwrap/icalvcalendar.rs
@@ -62,6 +62,11 @@ impl IcalVCalendar {
self
}
+ pub fn with_path(mut self, path: &Path) -> IcalVCalendar {
+ self.path = Some(path.to_path_buf());
+ self
+ }
+
pub fn from_str(str: &str, path: Option<&Path>) -> Result<Self, String> {
unsafe {
let c_str = CString::new(str).unwrap();