kitchen-freezer/src/event.rs

41 lines
845 B
Rust
Raw Normal View History

//! Calendar events
use serde::{Deserialize, Serialize};
use crate::item::ItemId;
2021-03-22 23:42:41 +01:00
use crate::item::SyncStatus;
/// 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,
}
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
}
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-04-03 17:42:55 +02:00
pub fn has_same_observable_content(&self, _other: &Event) -> bool {
unimplemented!();
}
}