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

Method is_valid

cranelift/entity/src/list.rs:307–310  ·  view source on GitHub ↗

Returns `true` if the list is valid

(&self, pool: &ListPool<T>)

Source from the content-addressed store, hash-verified

305
306 /// Returns `true` if the list is valid
307 pub fn is_valid(&self, pool: &ListPool<T>) -> bool {
308 // We consider an empty list to be valid
309 self.is_empty() || pool.len_of(self) != None
310 }
311
312 /// Get the list as a slice.
313 pub fn as_slice<'a>(&self, pool: &'a ListPool<T>) -> &'a [T] {

Callers

nothing calls this directly

Calls 2

len_ofMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected