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

Method is_valid

cranelift/entity/src/boxed_slice.rs:42–44  ·  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

40
41 /// Check if `k` is a valid key in the map.
42 pub fn is_valid(&self, k: K) -> bool {
43 k.index() < self.elems.len()
44 }
45
46 /// Get the element at `k` if it exists.
47 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