Skip to main content

ArrayBufferSource

Trait ArrayBufferSource 

Source
pub unsafe trait ArrayBufferSource {
    // Required methods
    fn as_ptr(&self) -> *mut u8;
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

A contiguous byte region owned by self and usable as the backing store of an ArrayBuffer.

§Safety

Required Methods§

Source

fn as_ptr(&self) -> *mut u8

Source

fn len(&self) -> usize

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ArrayBufferSource for Box<[u8]>

Source§

fn as_ptr(&self) -> *mut u8

Source§

fn len(&self) -> usize

Source§

impl ArrayBufferSource for Arc<Vec<u8>>

Source§

fn as_ptr(&self) -> *mut u8

Source§

fn len(&self) -> usize

Source§

impl ArrayBufferSource for Arc<[u8]>

Source§

fn as_ptr(&self) -> *mut u8

Source§

fn len(&self) -> usize

Source§

impl ArrayBufferSource for Vec<u8>

Source§

fn as_ptr(&self) -> *mut u8

Source§

fn len(&self) -> usize

Implementors§