Function quickjs_runtime::quickjs_utils::typedarrays::new_array_buffer_copy
source · [−]pub unsafe fn new_array_buffer_copy(
ctx: *mut JSContext,
buf: &[u8]
) -> Result<JSValueRef, JsError>
Expand description
create an array buffer with a copy of the data in a Vec
Safety
please ensure that the relevant QuickjsRealmAdapter is not dropped while using this function or a result of this function