task_tracker_cli/models/mod.rs
1/// Task models and data structures
2
3pub mod task_status;
4
5pub use task_status::TaskStatus;
6
7/// Trait for serializable types
8pub trait Serializable {
9 fn to_json(&self) -> json::JsonValue;
10 fn from_json(json: &json::JsonValue) -> Option<Self>
11 where
12 Self: Sized;
13}
14
15/// Trait for types with unique identifiers
16pub trait Identifiable {
17 fn get_id(&self) -> u32;
18}