Implemented create_calendar for caldav client
This commit is contained in:
parent
26c49a85c2
commit
5322f04d83
3 changed files with 44 additions and 1 deletions
|
@ -18,6 +18,19 @@ bitflags! {
|
|||
}
|
||||
}
|
||||
|
||||
impl SupportedComponents {
|
||||
pub fn to_xml_string(&self) -> String {
|
||||
format!(r#"
|
||||
<C:supported-calendar-component-set>
|
||||
{} {}
|
||||
</C:supported-calendar-component-set>
|
||||
"#,
|
||||
if self.contains(Self::EVENT) { "<C:comp name=\"VEVENT\"/>" } else { "" },
|
||||
if self.contains(Self::TODO) { "<C:comp name=\"VTODO\"/>" } else { "" },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<minidom::Element> for SupportedComponents {
|
||||
type Error = Box<dyn Error>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue