[][src]Function dart_sys::Dart_NewExternalTypedDataWithFinalizer

pub unsafe extern "C" fn Dart_NewExternalTypedDataWithFinalizer(
    type_: Dart_TypedData_Type,
    data: *mut c_void,
    length: isize,
    peer: *mut c_void,
    external_allocation_size: isize,
    callback: Dart_WeakPersistentHandleFinalizer
) -> Dart_Handle

Returns a TypedData object which references an external data array.

\param type The type of the data array. \param data A data array. This array must not move. \param length The length of the data array (length in type units). \param peer A pointer to a native object or NULL. This value is provided to callback when it is invoked. \param external_allocation_size The number of externally allocated bytes for peer. Used to inform the garbage collector. \param callback A function pointer that will be invoked sometime after the object is garbage collected, unless the handle has been deleted. A valid callback needs to be specified it cannot be NULL.

\return The TypedData object if no error occurs. Otherwise returns an error handle.