[]Trait amethyst_rendy::rendy::memory::Write

pub trait Write<T> where
    T: Copy
{ unsafe fn slice(&mut self) -> &mut [T]; fn write(&mut self, data: &[T]) { ... } }

Trait for memory region suitable for host writes.

Required methods

unsafe fn slice(&mut self) -> &mut [T]

Get mutable slice of T bound to mapped range.


  • Returned slice should not be read.
Loading content...

Provided methods

fn write(&mut self, data: &[T])

Write data into mapped memory sub-region.


Panics if data.len() is greater than this sub-region len.

Loading content...


Loading content...