Skip to content

Commit 7b83e1e

Browse files
committed
feat(engine-base/executor): allow listing all registered engines
1 parent 6748744 commit 7b83e1e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

engine-base/src/executor.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ impl Executor {
4141
self.engine_map.remove(&engine_id);
4242
}
4343

44+
/// Show all the registered engines.
45+
pub fn list(&self) -> Vec<&str> {
46+
self.engine_map.keys().map(|v| v.as_ref()).collect::<Vec<&str>>()
47+
}
48+
4449
/// Search with the specified engines.
4550
pub async fn search(
4651
&self,

0 commit comments

Comments
 (0)