Provide more detailed access to the ids and tasks
This commit is contained in:
parent
c9be7a7483
commit
879fa3fb48
1 changed files with 6 additions and 2 deletions
|
@ -29,12 +29,16 @@ impl<'a> Task<'a> {
|
||||||
.map_err(|e| TodoError::new(TodoErrorKind::StoreError, Some(Box::new(e))))
|
.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")
|
store.retrieve_for_module("todo/taskwarrior")
|
||||||
.map(|iter| TaskIterator::new(store, iter))
|
|
||||||
.map_err(|e| TodoError::new(TodoErrorKind::StoreError, Some(Box::new(e))))
|
.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> {
|
impl<'a> Deref for Task<'a> {
|
||||||
|
|
Loading…
Reference in a new issue