Profiles: Add 'all-profiles' iterator
This commit is contained in:
parent
deca730bf7
commit
acdf7e69fa
|
@ -284,6 +284,18 @@ impl Store {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn all(&self) -> impl DoubleEndedIterator<Item = Uuid> {
|
||||
self.owner_created_tree
|
||||
.iter()
|
||||
.values()
|
||||
.filter_map(|res| res.ok())
|
||||
.filter_map(|ivec| {
|
||||
let id_str = String::from_utf8_lossy(&ivec);
|
||||
id_str.parse().ok()
|
||||
})
|
||||
.rev()
|
||||
}
|
||||
|
||||
pub fn newer_than(&self, id: Uuid) -> impl DoubleEndedIterator<Item = Uuid> {
|
||||
let this = self.clone();
|
||||
|
||||
|
|
Loading…
Reference in a new issue