Trait DeviceMemoryMut
Source pub trait DeviceMemoryMut: DeviceMemory + VkHandleMut {
// Provided methods
unsafe fn map_raw(
&mut self,
range: Range<VkDeviceSize>,
) -> Result<*mut c_void> { ... }
fn map(&mut self, range: Range<usize>) -> Result<MappedMemory<'_, Self>> { ... }
unsafe fn unmap(&mut self) { ... }
}
Map a memory object into application address space
§Safety
mapped memory must be unmapped once
§Failure
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_MEMORY_MAP_FAILED
Map a memory object into application address space
§Failure
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_MEMORY_MAP_FAILED
Unmap a previously mapped memory object
§Safety
Caller must guarantee that there is no MappedMemoryRange alives.
Accessing the mapped memory after this call has undefined behavior
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.