pub trait TypedArrayElement {
    type Element;

    // Required methods
    unsafe fn unwrap_array(obj: *mut JSObject) -> *mut JSObject;
    unsafe fn length_and_data(obj: *mut JSObject) -> (*mut Self::Element, usize);
Expand description

Internal trait used to associate an element type with an underlying representation and various functions required to manipulate typed arrays of that element type.

Required Associated Types§


type Element

Underlying primitive representation of this element type.

Required Methods§


unsafe fn unwrap_array(obj: *mut JSObject) -> *mut JSObject

Unwrap a typed array JS reflector for this element type.


unsafe fn length_and_data(obj: *mut JSObject) -> (*mut Self::Element, usize)

Retrieve the length and data of a typed array’s buffer for this element type.

Object Safety§

This trait is not object safe.