write_bytes

Function write_bytes 

Source
pub unsafe fn write_bytes(ptr: StablePtr, buf: &[u8])
Expand description

Write raw bytes to stable memory.

Under the hood simply calls stable64_write.

§Safety

Make sure you’re writing to a valid memory block. All kinds of bad things can happen. Also, this function does not handle stable memory ownership in any way, so you have to make sure your data won’t get stable-dropped manually. See SBox for an example of how this can be done.