INNER CODE UNIT · Rust
get_runtime
vmware-labs/wasm-workers-server · crates/config/src/lib.rs:84
pub fn get_runtime(&self, repository: &str, name: &str, version: &str) -> Option<&Runtime> {
let repo = self.repositories.iter().find(|r| r.name == repository);
if let Some(repo) = repo {
repo.runtimes
.iter()
.find(|r| r.name == name && r.version == version)
} else {
None
}
}
/// Check if there're missing runtimes based on the current configuration
pub fn is_missing_any_runtime(&self, project_root: &Path) -> bool {
for repo in &self.repositories {
if repo
.runtimes
.iter()