Made stuff serializable

This commit is contained in:
daladim 2021-02-24 17:38:08 +01:00
parent 03884c6ff9
commit 1451f41ae3
3 changed files with 9 additions and 3 deletions

View file

@ -2,6 +2,7 @@ use std::convert::TryFrom;
use std::error::Error;
use url::Url;
use serde::{Deserialize, Serialize};
use crate::task::Task;
use crate::task::TaskId;
@ -9,6 +10,7 @@ use crate::task::TaskId;
use bitflags::bitflags;
bitflags! {
#[derive(Serialize, Deserialize)]
pub struct SupportedComponents: u8 {
/// An event, such as a calendar meeting
const EVENT = 1;
@ -45,7 +47,7 @@ impl TryFrom<minidom::Element> for SupportedComponents {
/// A Caldav Calendar
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Calendar {
name: String,
url: Url,