Type Definition neon::types::JsUint32Array

source · []
pub type JsUint32Array = JsTypedArray<u32>;
Expand description

The standard JS Uint32Array type.

Example

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

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

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

    Ok(cx.undefined())
}