This commit is contained in:
bel
2024-05-06 22:25:55 -06:00
parent 5a75b3e5f2
commit 1d958e8a52
3 changed files with 124 additions and 8 deletions

View File

@@ -1,21 +1,24 @@
use serde_yaml;
fn main() {
println!("{:?}", Task{todo: "x".to_string(), when: None, detail: None, sub: vec![]})
println!("{:?}", Task::new())
}
#[derive(Debug)]
struct Task {
pub todo: String,
pub when: Option<When>,
pub detail: Option<String>,
pub sub: Vec<Task>,
}
struct Task(serde_yaml::Mapping);
//pub todo: String,
//pub when: Option<When>,
//pub detail: Option<String>,
//pub sub: Vec<Task>,
impl Task {
fn is_due(&self) -> bool {
self.when.is_none() || self.when.clone().unwrap().is_due()
assert!(false);
false
}
}
/*
#[derive(Debug, Clone)]
struct When(String);
@@ -25,3 +28,4 @@ impl When {
false
}
}
*/