2021-02-28 11:54:31 +01:00
|
|
|
//! Calendar events
|
|
|
|
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
use crate::item::ItemId;
|
2021-03-22 23:42:41 +01:00
|
|
|
use crate::item::SyncStatus;
|
2021-03-29 09:29:48 +02:00
|
|
|
use crate::item::VersionTag;
|
2021-02-28 11:54:31 +01:00
|
|
|
|
|
|
|
/// TODO: implement Event one day.
|
|
|
|
/// This crate currently only supports tasks, not calendar events.
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub struct Event {
|
|
|
|
id: ItemId,
|
|
|
|
name: String,
|
2021-03-22 23:42:41 +01:00
|
|
|
sync_status: SyncStatus,
|
2021-02-28 11:54:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Event {
|
2021-03-29 09:29:48 +02:00
|
|
|
pub fn new() -> Self {
|
2021-04-03 17:41:25 +02:00
|
|
|
unimplemented!();
|
2021-03-29 09:29:48 +02:00
|
|
|
}
|
|
|
|
|
2021-02-28 11:54:31 +01:00
|
|
|
pub fn id(&self) -> &ItemId {
|
|
|
|
&self.id
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn name(&self) -> &str {
|
|
|
|
&self.name
|
|
|
|
}
|
|
|
|
|
2021-03-22 23:42:41 +01:00
|
|
|
pub fn sync_status(&self) -> &SyncStatus {
|
|
|
|
&self.sync_status
|
|
|
|
}
|
|
|
|
pub fn set_sync_status(&mut self, new_status: SyncStatus) {
|
|
|
|
self.sync_status = new_status;
|
2021-03-22 22:06:43 +01:00
|
|
|
}
|
2021-02-28 11:54:31 +01:00
|
|
|
}
|