devjournal 0.1.0

A dev first cli journaling tool
Documentation
1
2
3
4
5
6
7
8
9
10
use anyhow::Result;
use uuid::Uuid;

/// Generic repository interface
pub trait Repository<T>: Send + Sync {
    fn add(&self, item: &T) -> Result<()>;
    fn update(&self, item: &T) -> Result<()>;
    fn get(&self, id: &Uuid) -> Result<Option<T>>;
    fn get_by_name(&self, name: &String) -> Result<Option<T>>;
}