Syncs without handling conflicts

This commit is contained in:
daladim 2021-02-27 11:58:40 +01:00
parent 4dd0bea78b
commit 6fe9b71e16
4 changed files with 131 additions and 7 deletions

View file

@ -1,10 +1,12 @@
use std::fmt::{Display, Formatter};
use chrono::{Utc, DateTime};
use serde::{Deserialize, Serialize};
// TODO: turn into this one day
// pub type TaskId = String; // This is an HTML "etag"
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[derive(Clone, Debug, PartialEq, Hash, Serialize, Deserialize)]
pub struct TaskId {
content: String,
}
@ -14,6 +16,12 @@ impl TaskId{
Self { content:u }
}
}
impl Eq for TaskId {}
impl Display for TaskId {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", self.content)
}
}
/// A to-do task
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]