Skip to content

Commit 12a1d52

Browse files
Merge pull request #81 from only-cliches/master
Add list_context() method
2 parents 2210d3f + a3e7d9b commit 12a1d52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/quickjsruntimeadapter.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@ impl QuickJsRuntimeAdapter {
466466
Ok(())
467467
})
468468
}
469+
pub fn list_contexts(&self) -> Vec<&str> {
470+
self.contexts.keys().map(|k| k.as_str()).collect()
471+
}
469472
pub fn remove_context(id: &str) {
470473
log::debug!("QuickJsRuntime::drop_context: {}", id);
471474

0 commit comments

Comments
 (0)