1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/// Struct to keep the todos pub struct Todo{ pub title: String, pub description: String, } impl Todo{ // Constructor for initializing the Todo pub fn new(title:String,description:String) -> Self{ Self{ title, description, } } }