Function hdk::prelude::allocation::consume_bytes[][src]

pub fn consume_bytes(guest_ptr: u32) -> Vec<u8, Global>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>

Attempt to consume bytes out of a length-prefixed allocation at the given pointer position.

Consume in this context means take ownership of previously forgotten data.

This needs to work for bytes written into the guest from the host and for bytes written with the write_bytes() function within the guest.