Trait BufferCreator

Source
pub trait BufferCreator<T>: Sized
where T: ClNumber,
{ // Required methods fn buffer_byte_size(&self) -> usize; fn buffer_ptr(&self) -> *mut c_void; fn mem_config(&self) -> MemConfig; }

Required Methods§

Source

fn buffer_byte_size(&self) -> usize

The SizeAndPtr of a buffer creation arg.

Currently the only 2 types that implement BufferCreator are usize representiing length/size and &[T] for ClNumber T representing data.

Source

fn buffer_ptr(&self) -> *mut c_void

Source

fn mem_config(&self) -> MemConfig

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<T> BufferCreator<T> for &[T]
where T: ClNumber,

Source§

impl<T> BufferCreator<T> for &mut [T]
where T: ClNumber,

Source§

impl<T> BufferCreator<T> for usize
where T: ClNumber,

Implementors§