diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-07-15 15:21:13 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-07-21 17:14:12 +0200 |
commit | 9ff26360e454cb0df6d3cc6c7aa0c0d129d83d98 (patch) | |
tree | b9b47a3544969bc189b8b460ec09e8929c2d4c20 /libimagtodo | |
parent | 1ec11749f23adcf3bf8b8a9d06cd2ea4d75638b6 (diff) |
Remove the Task::update...() foo, as we do only store UUIDs which do not change
Diffstat (limited to 'libimagtodo')
-rw-r--r-- | libimagtodo/src/task.rs | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/libimagtodo/src/task.rs b/libimagtodo/src/task.rs index 2d978cb9..101f3288 100644 --- a/libimagtodo/src/task.rs +++ b/libimagtodo/src/task.rs @@ -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)))) |