[][src]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

Important traits for &'_ [u8]
unsafe fn slice(&mut self) -> &mut [T]

Get mutable slice of T bound to mapped range.

Safety

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

Provided methods

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

Write data into mapped memory sub-region.

Panic

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

Loading content...

Implementors

Loading content...