diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-07-06 20:13:20 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-07-21 17:14:11 +0200 |
commit | 879fa3fb482caa2953a5706bf827409902ad5bcc (patch) | |
tree | dada7ecc6fb8ad2a15b2a97015904a532318d7f0 /libimagtodo | |
parent | c9be7a7483a076a2ffc240adc9100a7e22a6a7f7 (diff) |
Provide more detailed access to the ids and tasks
Diffstat (limited to 'libimagtodo')
-rw-r--r-- | libimagtodo/src/task.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libimagtodo/src/task.rs b/libimagtodo/src/task.rs index 3bf897d8..db757735 100644 --- a/libimagtodo/src/task.rs +++ b/libimagtodo/src/task.rs @@ -29,12 +29,16 @@ impl<'a> Task<'a> { .map_err(|e| TodoError::new(TodoErrorKind::StoreError, Some(Box::new(e)))) } - pub fn all(store: &Store) -> Result<TaskIterator> { + pub fn all_as_ids(store: &Store) -> Result<StoreIdIterator> { store.retrieve_for_module("todo/taskwarrior") - .map(|iter| TaskIterator::new(store, iter)) .map_err(|e| TodoError::new(TodoErrorKind::StoreError, Some(Box::new(e)))) } + pub fn all(store: &Store) -> Result<TaskIterator> { + Task::all_as_ids(store) + .map(|iter| TaskIterator::new(store, iter)) + } + } impl<'a> Deref for Task<'a> { |