neon::types

Type Alias JsInt16Array

Source
pub type JsInt16Array = JsTypedArray<i16>;
Expand description

The type of JavaScript Int16Array objects.

§Example

use neon::types::buffer::TypedArray;

fn double(mut cx: FunctionContext) -> JsResult<JsUndefined> {
    let mut array: Handle<JsInt16Array> = cx.argument(0)?;

    for elem in array.as_mut_slice(&mut cx).iter_mut() {
        *elem *= 2;
    }

    Ok(cx.undefined())
}

Aliased Type§

struct JsInt16Array(/* private fields */);