Skip to main content

TypedArrayElementCreator

Trait TypedArrayElementCreator 

Source
pub trait TypedArrayElementCreator: TypedArrayElement {
    // Required methods
    unsafe fn create_new(cx: *mut JSContext, length: usize) -> *mut JSObject;
    unsafe fn get_data(obj: *mut JSObject) -> *mut Self::Element;
}
Expand description

Internal trait for creating new typed arrays.

Required Methods§

Source

unsafe fn create_new(cx: *mut JSContext, length: usize) -> *mut JSObject

Create a new typed array.

Source

unsafe fn get_data(obj: *mut JSObject) -> *mut Self::Element

Get the data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§