Trait luminance_webgl::webgl2::IntoArrayBuffer[][src]

pub trait IntoArrayBuffer: Sized {
    unsafe fn into_array_buffer(texels: &[Self]) -> Object;
}
Expand description

Unsafe coercion to a js_sys::Object for immutable slices.

This trait provides the into_array_buffer method, which is an unsafe operation, as the view() method, defined on the various arrays in the js-sys crate, requires that the underlying memory not be moved until the array is dropped.

Required methods

Convert the input slice into a JavaScript object.

Unsafety

The returned Object must not outlive the input slice, which memory must not be moved either.

Implementations on Foreign Types

Implementors