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

Method as_array

crates/wasmtime/src/runtime/gc/enabled/eqref.rs:443–445  ·  view source on GitHub ↗

Downcast this `eqref` to an `arrayref`. If this `eqref` is an `arrayref`, then `Some(_)` is returned. If this `eqref` is not an `arrayref`, then `None` is returned. # Errors Return an error if this reference has been unrooted. # Panics Panics if this reference is associated with a different store.

(&self, store: impl AsContext)

Source from the content-addressed store, hash-verified

441 ///
442 /// Panics if this reference is associated with a different store.
443 pub fn as_array(&self, store: impl AsContext) -> Result<Option<Rooted<ArrayRef>>> {
444 self._as_array(store.as_context().0)
445 }
446
447 pub(crate) fn _as_array(&self, store: &StoreOpaque) -> Result<Option<Rooted<ArrayRef>>> {
448 if self._is_array(store)? {

Callers 15

first_non_empty_iovecMethod · 0.45
write_bytesFunction · 0.45
poll_oneoffMethod · 0.45
poll_oneoffMethod · 0.45
get_outputMethod · 0.45
load_flat_pointer_pairFunction · 0.45
write_to_guestMethod · 0.45
poll_oneoffMethod · 0.45
fd_readMethod · 0.45

Calls 2

_as_arrayMethod · 0.45
as_contextMethod · 0.45

Tested by

no test coverage detected