Function todo_lib::todo::add

source ·
pub fn add(tasks: &mut TaskVec, c: &Conf) -> usize
Expand description

Appends a new todo to todo list

  • tasks - a list of todos for adding a new item
  • c - information about new todo. At this moment only subject field is used - it should contains all info including due date, priority etc. The subject field should be in todo.txt format

Returns:

  • INVALID_ID if the subject is empty or cannot be parsed as todo.txt entry
  • id of the new todo