Skip to main content

IntoArrayBuffer

Trait IntoArrayBuffer 

Source
pub trait IntoArrayBuffer: Sized {
    // Required method
    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§

Source

unsafe fn into_array_buffer(texels: &[Self]) -> Object

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IntoArrayBuffer for (f32, f32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (f32, f32, f32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (f32, f32, f32, f32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (f64, f64)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (f64, f64, f64)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (f64, f64, f64, f64)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i8, i8)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i8, i8, i8)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i8, i8, i8, i8)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i16, i16)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i16, i16, i16)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i16, i16, i16, i16)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i32, i32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i32, i32, i32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (i32, i32, i32, i32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u8, u8)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u8, u8, u8)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u8, u8, u8, u8)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u16, u16)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u16, u16, u16)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u16, u16, u16, u16)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u32, u32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u32, u32, u32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for (u32, u32, u32, u32)

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for f32

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for f64

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for i8

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for i16

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for i32

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for u8

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for u16

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl IntoArrayBuffer for u32

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [f32; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [f64; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [i8; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [i16; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [i32; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [u8; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [u16; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Source§

impl<const N: usize> IntoArrayBuffer for [u32; N]

Source§

unsafe fn into_array_buffer(texels: &[Self]) -> Object

Implementors§