1 2 3 4 5 6 7 8 9 10 11 12 13 14
use serde::{Deserialize, Serialize}; #[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct Task {} impl Task { pub fn new() -> Self { Self {} } pub fn add(&self, task: Task) { println!("Added task: {:#?}", task); } }