MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / is_valid

Method is_valid

cranelift/entity/src/primary.rs:69–71  ·  view source on GitHub ↗

Check if `k` is a valid key in the map.

(&self, k: K)

Source from the content-addressed store, hash-verified

67
68 /// Check if `k` is a valid key in the map.
69 pub fn is_valid(&self, k: K) -> bool {
70 k.index() < self.elems.len()
71 }
72
73 /// Get the element at `k` if it exists.
74 pub fn get(&self, k: K) -> Option<&V> {

Callers

nothing calls this directly

Calls 2

indexMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected