Trait BufferData

Source
pub trait BufferData: 'static {
    // Required methods
    fn buf_ptr(&self) -> *mut c_void;
    fn stride(&self) -> usize;
    fn buf_len(&self) -> usize;
}
Expand description

A buffer allocated in Linear memory.

Required Methods§

Source

fn buf_ptr(&self) -> *mut c_void

A pointer to the underlying data

Source

fn stride(&self) -> usize

The size (in bytes) of each element in the buffer

Source

fn buf_len(&self) -> usize

How many elements are in the buffer

Implementations on Foreign Types§

Source§

impl<T: Sized + 'static> BufferData for Box<[T], LinearAllocator>

Source§

fn buf_ptr(&self) -> *mut c_void

Source§

fn stride(&self) -> usize

Source§

fn buf_len(&self) -> usize

Source§

impl<T: Sized + 'static> BufferData for Rc<[T], LinearAllocator>

Source§

fn buf_ptr(&self) -> *mut c_void

Source§

fn stride(&self) -> usize

Source§

fn buf_len(&self) -> usize

Source§

impl<T: Sized + 'static> BufferData for Vec<T, LinearAllocator>

Source§

fn buf_ptr(&self) -> *mut c_void

Source§

fn stride(&self) -> usize

Source§

fn buf_len(&self) -> usize

Implementors§