pub fn slice<'s>(&self, ctx: &VmContext, len: Size) -> WasmResult<&'s [Cell<T>]> {
        let len = len as usize;

        // Safety: pointer is correctly aligned and points to real data.
        self.get_ptr_and_verify(
            ctx,
            (size_of::<T>() + (size_of::<T>() % align_of::<T>())) * len,
        )
        .map(|p| unsafe { slice::from_raw_parts(p as *const Cell<T>, len) })
    }
/// Gets a slice of cells from a Wasm pointer, does checks for alignment and bounds.
/// Returns Ok(slice) on success and Err(Errno) on fail.
Gets a slice of cells from a Wasm pointer, does checks for alignment and bounds.
Gets a slice of cells from a Wasm pointer does checks for alignment and bounds .
pub fn slice<'s>(&self, ctx: &VmContext, len: Size) -> WasmResult<&'s [Cell<T>]> {
        let len = len as usize;
        // Safety: pointer is correctly aligned and points to real data.
        self.get_ptr_and_verify(
            ctx,
            (size_of::<T>() + (size_of::<T>() % align_of::<T>())) * len,
        )
        .map(|p| unsafe { slice::from_raw_parts(p as *const Cell<T>, len) })
    }
pub fn slice < ' s > ( & self , ctx : & VmContext , len : Size ) -> WasmResult < & ' s [ Cell < T > ] > { let len = len as usize ; // Safety: pointer is correctly aligned and points to real data. self . get_ptr_and_verify ( ctx , ( size_of :: < T > ( ) + ( size_of :: < T > ( ) % align_of :: < T > ( ) ) ) * len , ) . map ( | p | unsafe { slice :: from_raw_parts ( p as * const Cell < T > , len ) } ) }
Gets a slice of cells from a Wasm pointer, does checks for alignment and bounds.
Gets a slice of cells from a Wasm pointer does checks for alignment and bounds .
&self
ctx
&VmContext
len
Size
&self
ctx
&VmContext
len
Size