Trait js::typedarray::TypedArrayElement
[−]
[src]
pub trait TypedArrayElement { type Element; unsafe fn unwrap_array(obj: *mut JSObject) -> *mut JSObject; unsafe fn length_and_data(obj: *mut JSObject) -> (*mut Self::Element, u32); }
Internal trait used to associate an element type with an underlying representation and various functions required to manipulate typed arrays of that element type.
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, u32)
Retrieve the length and data of a typed array's buffer for this element type.
Implementors
impl TypedArrayElement for Uint8 type Element = u8;
impl TypedArrayElement for Uint16 type Element = u16;
impl TypedArrayElement for Uint32 type Element = u32;
impl TypedArrayElement for Int8 type Element = i8;
impl TypedArrayElement for Int16 type Element = i16;
impl TypedArrayElement for Int32 type Element = i32;
impl TypedArrayElement for Float32 type Element = f32;
impl TypedArrayElement for Float64 type Element = f64;
impl TypedArrayElement for ClampedU8 type Element = u8;
impl TypedArrayElement for ArrayBufferU8 type Element = u8;
impl TypedArrayElement for ArrayBufferViewU8 type Element = u8;