Function uniffi::ffi::uniffi_rustbuffer_from_bytes
pub fn uniffi_rustbuffer_from_bytes(
bytes: ForeignBytes,
call_status: &mut RustCallStatus
) -> RustBufferExpand description
This helper copies bytes owned by the foreign-language code into a new byte buffer owned
by the Rust code, and returns it as a RustBuffer struct. Callers must eventually
free the resulting buffer, either by explicitly calling the destructor defined below,
or by passing ownership of the buffer back into Rust code.
Safety
This function will dereference a provided pointer in order to copy bytes from it, so
make sure the ForeignBytes struct contains a valid pointer and length.