Skip to main content

runtime_bytes_slice

Function runtime_bytes_slice 

Source
pub unsafe fn runtime_bytes_slice<'a>(
    bytes: RuntimeBytesRef,
) -> Result<&'a [u8], &'static str>
Expand description

Converts an ABI byte reference into a Rust slice.

ยงSafety

The caller must ensure bytes.ptr is valid for bytes.len bytes for the returned lifetime.