serde_v8

Trait V8Sliceable

Source
pub trait V8Sliceable: Copy + Clone {
    type V8;

    // Required method
    fn new_buf<'s>(
        scope: &mut HandleScope<'s>,
        buf: Local<'_, ArrayBuffer>,
        byte_offset: usize,
        length: usize,
    ) -> Option<Local<'s, Self::V8>>;
}
Expand description

A type that may be represented as a V8Slice.

Required Associated Types§

Source

type V8

The concrete V8 data view type.

Required Methods§

Source

fn new_buf<'s>( scope: &mut HandleScope<'s>, buf: Local<'_, ArrayBuffer>, byte_offset: usize, length: usize, ) -> Option<Local<'s, Self::V8>>

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 V8Sliceable for f64

Source§

type V8 = Float64Array

Source§

fn new_buf<'s>( scope: &mut HandleScope<'s>, buf: Local<'_, ArrayBuffer>, byte_offset: usize, length: usize, ) -> Option<Local<'s, Self::V8>>

Source§

impl V8Sliceable for u8

Source§

type V8 = Uint8Array

Source§

fn new_buf<'s>( scope: &mut HandleScope<'s>, buf: Local<'_, ArrayBuffer>, byte_offset: usize, length: usize, ) -> Option<Local<'s, Self::V8>>

Source§

impl V8Sliceable for u32

Source§

type V8 = Uint32Array

Source§

fn new_buf<'s>( scope: &mut HandleScope<'s>, buf: Local<'_, ArrayBuffer>, byte_offset: usize, length: usize, ) -> Option<Local<'s, Self::V8>>

Implementors§