pub struct TodoList {
pub tasks: Vec<Task>,
}Fields§
§tasks: Vec<Task>Implementations§
Source§impl TodoList
impl TodoList
pub fn new() -> Self
pub fn add_task(&mut self, description: String, group: Option<String>)
pub fn toggle_task(&mut self, task_id: usize) -> Result<(), String>
pub fn remove_task(&mut self, task_id: usize) -> Result<(), String>
pub fn clear(&mut self)
pub fn list_tasks(&self)
pub fn edit_task( &mut self, task_id: usize, new_description: String, ) -> Result<(), String>
pub fn search_tasks(&self, partial_description: &str) -> Vec<(usize, &Task)>
pub fn display_task(&self, index: usize, task: &Task)
pub fn to_markdown(&self) -> String
pub fn from_markdown(content: &str) -> Self
pub fn load(todo_list_location: &TodoListLocation) -> Self
pub fn save(&self, todo_list_location: &TodoListLocation) -> Result<()>
Auto Trait Implementations§
impl Freeze for TodoList
impl RefUnwindSafe for TodoList
impl Send for TodoList
impl Sync for TodoList
impl Unpin for TodoList
impl UnsafeUnpin for TodoList
impl UnwindSafe for TodoList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more