Function todo_lib::todo::edit [−][src]
pub fn edit(tasks: &mut TaskVec, ids: Option<&IDVec>, c: &Conf) -> ChangedVec
Expand description
Modifies existing todos.
A powerful function to transform todo list. List of operations:
- for priority: change, remove, increase or decrease by one;
- for subject: set a new subject;
- for due date: remove or set a new one;
- for recurrence: remove or set a new one (setting recurrence clears
done
flag; - for project: add a new, remove old, replace old with new one;
- for context: add a new, remove old, replace old with new one;
tasks
- the task listids
- the list of todo IDs which should be undone. If it isNone
the entire task list is marked undone.c
- what to modify and how
if c
contains a new subject then only the first todo from ids
is
modified. For all other cases the function processes all todos from ids
.
Returns a list of boolean values: a value per each ID in ids
or tasks
.
The length of the result list equals either length of ids
(if ids
is
Some
) or length of tasks
(if ids
is None
). Value true
in this
array means that corresponding item from ids
or tasks
was modified.