Provide more detailed access to the ids and tasks

This commit is contained in:
Matthias Beyer 2016-07-06 20:13:20 +02:00
parent c9be7a7483
commit 879fa3fb48

View file

@ -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> {