diff options
author | Nora <nora.widdecke@tu-bs.de> | 2019-01-13 02:54:30 +0100 |
---|---|---|
committer | Nora <nora.widdecke@tu-bs.de> | 2019-01-13 02:54:30 +0100 |
commit | c475991617ca9c98fb280191878c79c3b783bc5f (patch) | |
tree | 813cdf9f8d7542c836c189dfaa0f68f4c07b2fec /src/icalwrap | |
parent | 0c54bb32d7b11ea5e42992e52d6428baee585f9f (diff) |
icalvcalendar: add function with_path
Diffstat (limited to 'src/icalwrap')
-rw-r--r-- | src/icalwrap/icalvcalendar.rs | 5 |
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(); |