asimov_directory/module_iterators.rs
1// This is free and unencumbered software released into the public domain.
2
3use asimov_core::ModuleName;
4use asimov_module::InstalledModuleManifest;
5
6/// An iterator over module names in a module directory.
7pub trait ModuleNameIterator {
8 fn next(&mut self) -> impl Future<Output = Option<ModuleName>> + Send;
9}
10
11/// An iterator over module manifests in a module directory.
12pub trait ModuleManifestIterator {
13 fn next(&mut self) -> impl Future<Output = Option<InstalledModuleManifest>> + Send;
14}
15
16/// An iterator over module names in a module directory.
17pub trait BlockingModuleNameIterator {
18 fn next(&mut self) -> Option<ModuleName>;
19}