Trait vk_alloc::AllocationInfo [−][src]
Trait to get the memory, offset, size and mapped pointer of an allocation.
Required methods
fn memory(&self) -> DeviceMemory
[src]
The vk::DeviceMemory
of the allocation. Managed by the allocator.
fn offset(&self) -> u64
[src]
The offset inside the vk::DeviceMemory
.
fn size(&self) -> u64
[src]
The size of the allocation.
fn mapped_ptr(&self) -> Option<NonNull<c_void>>
[src]
Returns a pointer into the mapped memory if it is host visible, otherwise returns None.
Provided methods
fn mapped_slice(&self) -> Option<&[u8]>
[src]
Returns a valid mapped slice if the memory is host visible, otherwise it will return None. The slice already references the exact memory region of the sub allocation, so no offset needs to be applied.
fn mapped_slice_mut(&mut self) -> Option<&mut [u8]>
[src]
Returns a valid mapped mutable slice if the memory is host visible, otherwise it will return None. The slice already references the exact memory region of the sub allocation, so no offset needs to be applied.
Implementors
impl AllocationInfo for Allocation
[src]
fn memory(&self) -> DeviceMemory
[src]
The vk::DeviceMemory
of the allocation. Managed by the allocator.
fn offset(&self) -> u64
[src]
The offset inside the vk::DeviceMemory
.
fn size(&self) -> u64
[src]
The size of the allocation.
fn mapped_ptr(&self) -> Option<NonNull<c_void>>
[src]
Returns a pointer into the mapped memory if it is host visible, otherwise returns None.
impl AllocationInfo for LinearAllocation
[src]
fn memory(&self) -> DeviceMemory
[src]
The vk::DeviceMemory
of the allocation. Managed by the allocator.
fn offset(&self) -> u64
[src]
The offset inside the vk::DeviceMemory
.
fn size(&self) -> u64
[src]
The size of the allocation.
fn mapped_ptr(&self) -> Option<NonNull<c_void>>
[src]
Returns a pointer into the mapped memory if it is host visible, otherwise returns None.