todomd 0.2.0

A simple markdown-based todo list CLI and TUI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::core::model::State;
use anyhow::Result;

pub trait Store {
    fn load(&self) -> Result<State>;
    fn save(&self, state: &State) -> Result<()>;
}

impl Store for Box<dyn Store> {
    fn load(&self) -> Result<State> {
        self.as_ref().load()
    }
    fn save(&self, state: &State) -> Result<()> {
        self.as_ref().save(state)
    }
}