Remove the Task::update...() foo, as we do only store UUIDs which do not change
This commit is contained in:
parent
1ec11749f2
commit
9ff26360e4
1 changed files with 0 additions and 70 deletions
|
@ -74,76 +74,6 @@ impl<'a> Task<'a> {
|
|||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Call `Task::update_from_imports_with()` function with `Task::copy_information()`
|
||||
pub fn update_from_imports<R: BufRead>(store: &'a Store, mut r: R) -> Result<(Task<'a>,
|
||||
Task<'a>)> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Call `Task::update_from_strings_with()` function with `Task::copy_information()`
|
||||
pub fn update_from_strings<R>(store: &'a Store, old_t: String, new_t: String) -> Result<(Task<'a>, Task<'a>)>
|
||||
where R: BufRead
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Call `Task::update_from_uuid_and_string_with()` function with `Task::copy_information()`
|
||||
pub fn update_from_uuid_and_string<R>(store: &'a Store, old_t: Uuid, new_t: String) -> Result<(Task<'a>, Task<'a>)>
|
||||
where R: BufRead
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Update a task from imports.
|
||||
///
|
||||
/// Expects the `r` variable to return two JSON objects, the first one beeing the Task before
|
||||
/// the modification, the second one after the modification.
|
||||
///
|
||||
/// It then tries to load the first task, getting the corrosponding object from the store,
|
||||
/// and updating the task with the new information. That is
|
||||
///
|
||||
/// * Writing a new task object to the store
|
||||
/// * Copying all information from the header of the old task to the new task via
|
||||
/// the passed copy-functionality
|
||||
/// * Returning both Task objects in a tuple (old, new)
|
||||
///
|
||||
pub fn update_from_imports_with<R, F>(store: &'a Store, mut r: R, f: F) -> Result<(Task<'a>, Task<'a>)>
|
||||
where R: BufRead,
|
||||
F: Fn(&mut Task<'a>, &mut Task<'a>) -> Result<()>
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Same as `Task::update_from_imports_with()` but with two Strings rather than reading from a
|
||||
/// BufRead. Expects both Strings to contain readable JSON.
|
||||
pub fn update_from_strings_with<R, F>(store: &'a Store, old_t: String, new_t: String, f: F) -> Result<(Task<'a>, Task<'a>)>
|
||||
where R: BufRead,
|
||||
F: Fn(&mut Task<'a>, &mut Task<'a>) -> Result<()>
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Same as `Task::update_from_strings_with()` but with the parameter for the old task beeing
|
||||
/// the uuid of the task.
|
||||
pub fn update_from_uuid_and_string_with<R, F>(store: &'a Store, old_t: Uuid, new_t: String, f: F) -> Result<(Task<'a>, Task<'a>)>
|
||||
where R: BufRead,
|
||||
F: Fn(&mut Task<'a>, &mut Task<'a>) -> Result<()>
|
||||
{
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Copy information from one task to the second task. This function can be used to copy
|
||||
/// information from one task to another.
|
||||
///
|
||||
/// Two kinds of informations are copied:
|
||||
///
|
||||
/// 1. links (via libimagentrylink)
|
||||
/// 1. tags (via libimagentrytag)
|
||||
///
|
||||
pub fn copy_information(old_task: &mut Task<'a>, new_task: &mut Task<'a>) -> Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn delete_by_uuid(store: &Store, uuid: Uuid) -> Result<()> {
|
||||
store.delete(ModuleEntryPath::new(format!("taskwarrior/{}", uuid)).into_storeid())
|
||||
.map_err(|e| TodoError::new(TodoErrorKind::StoreError, Some(Box::new(e))))
|
||||
|
|
Loading…
Reference in a new issue