mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 11:42:25 +00:00
some refactoring
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
use derive_more::derive::From;
|
||||
use rustical_xml::{XmlDeserialize, XmlSerialize};
|
||||
|
||||
#[derive(Debug, Clone, XmlDeserialize, XmlSerialize, PartialEq)]
|
||||
#[derive(Debug, Clone, XmlDeserialize, XmlSerialize, PartialEq, From)]
|
||||
pub struct SupportedCalendarComponent {
|
||||
#[xml(ty = "attr")]
|
||||
pub name: String,
|
||||
pub name: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, XmlDeserialize, XmlSerialize, PartialEq)]
|
||||
@@ -12,6 +13,14 @@ pub struct SupportedCalendarComponentSet {
|
||||
pub comp: Vec<SupportedCalendarComponent>,
|
||||
}
|
||||
|
||||
impl Default for SupportedCalendarComponentSet {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
comp: vec!["VEVENT".into(), "VTODO".into(), "VJOURNAL".into()],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, XmlSerialize, PartialEq)]
|
||||
pub struct CalendarData {
|
||||
#[xml(ty = "attr")]
|
||||
|
||||
Reference in New Issue
Block a user