multiversx_chain_vm::mem_conv

Function with_bytes

Source
pub unsafe fn with_bytes<F, R>(offset: MemPtr, length: MemLength, f: F) -> R
where F: FnOnce(&[u8]) -> R,
Expand description

Interprets an offset and length (both isize) as a byte slice.

ยงSafety

Should only be called with arguments that originate from with_mem_ptr.