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

Method as_array

crates/wiggle/src/lib.rs:413–418  ·  view source on GitHub ↗

Returns a `GuestPtr` for an array of `T`s using this pointer as the base.

(&self, elems: u32)

Source from the content-addressed store, hash-verified

411 /// Returns a `GuestPtr` for an array of `T`s using this pointer as the
412 /// base.
413 pub fn as_array(&self, elems: u32) -> GuestPtr<[T]>
414 where
415 T: GuestType + Pointee<Pointer = u32>,
416 {
417 GuestPtr::new((self.pointer, elems))
418 }
419}
420
421impl<T> GuestPtr<[T]> {

Callers 3

anyref_as_arrayFunction · 0.45
get_rangeMethod · 0.45
readMethod · 0.45

Calls 1

newFunction · 0.50

Tested by 1

anyref_as_arrayFunction · 0.36