pub struct Memory { /* private fields */ }
Implementations§
Source§impl Memory
impl Memory
pub fn new( runtime: &Runtime, allocate_info: &TiMemoryAllocateInfo, ) -> Result<Self>
pub fn map<T>(&self) -> Result<MappedMemory<'_, T>>
pub fn read<T: Clone>(&self, dst: &mut [T]) -> Result<()>
pub fn write<T: Clone>(&self, src: &[T]) -> Result<()>
pub fn runtime(&self) -> TiRuntime
pub fn memory(&self) -> TiMemory
pub fn size(&self) -> usize
pub fn host_read(&self) -> bool
pub fn host_write(&self) -> bool
pub fn usage(&self) -> TiMemoryUsageFlags
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl !Send for Memory
impl !Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more