mod calendar_builder;
mod event_builder;
mod ical;
mod vcard_builder;
#[cfg(feature = "ical")]
pub use self::calendar_builder::*;
#[cfg(feature = "ical")]
pub use self::event_builder::*;
#[cfg(any(feature = "ical", feature = "vcard"))]
pub use self::ical::*;
#[cfg(feature = "vcard")]
pub use self::vcard_builder::*;
#[cfg(feature = "ical")]
pub use crate::parser::ical::component::{IcalCalendar, IcalEvent};
#[cfg(feature = "vcard")]
pub use crate::parser::vcard::component::VcardContact;
pub use crate::property::Property;
mod helper {
#[macro_export]
macro_rules! ical_param {
($key:literal, $($prop:expr),+) => {
(String::from($key), vec![$(String::from($prop),)+])
};
}
#[macro_export]
macro_rules! ical_property {
($name:literal, $value:expr) => {
Property {
name: String::from($name),
value: Some($value.into()),
params: None,
}
};
($name:literal, $value:expr, $($params:expr),+) => {
Property {
name: String::from($name),
value: Some(String::from($value)),
params: Some(vec![$($params,)+]),
}
};
}
}