#![warn(
clippy::all,
clippy::missing_errors_doc,
clippy::style,
clippy::unseparated_literal_suffix,
clippy::pedantic,
clippy::nursery
)]
mod bindings;
mod component;
mod events;
mod options;
mod duration;
pub use bindings::*;
pub use component::FullCalendarComponent;
pub use events::*;
pub use options::*;
pub use duration::*;
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
#[serde(untagged)]
pub enum EventDate {
Iso8601String(String),
#[serde(with = "serde_wasm_bindgen::preserve")]
Null(web_sys::wasm_bindgen::JsValue),
#[serde(with = "serde_wasm_bindgen::preserve")]
DateObject(web_sys::js_sys::Date),
Milliseconds(u64),
}
impl std::str::FromStr for EventDate {
type Err = serde_json::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(Self::Iso8601String(s.to_string()))
}
}
#[cfg(test)]
mod tests {}