[][src]Struct vk_mem::AllocationInfo

pub struct AllocationInfo { /* fields omitted */ }

Parameters of Allocation objects, that can be retrieved using Allocator::get_allocation_info.

Methods

impl AllocationInfo[src]

pub fn get_memory_type(&self) -> u32[src]

pub fn get_device_memory(&self) -> DeviceMemory[src]

Handle to Vulkan memory object.

Same memory object can be shared by multiple allocations.

It can change after call to Allocator::defragment if this allocation is passed to the function, or if allocation is lost.

If the allocation is lost, it is equal to ash::vk::DeviceMemory::null().

pub fn get_offset(&self) -> usize[src]

Offset into device memory object to the beginning of this allocation, in bytes. (self.get_device_memory(), self.get_offset()) pair is unique to this allocation.

It can change after call to Allocator::defragment if this allocation is passed to the function, or if allocation is lost.

pub fn get_size(&self) -> usize[src]

Size of this allocation, in bytes.

It never changes, unless allocation is lost.

pub fn get_mapped_data(&self) -> *mut u8[src]

Pointer to the beginning of this allocation as mapped data.

If the allocation hasn't been mapped using Allocator::map_memory and hasn't been created with AllocationCreateFlags::MAPPED flag, this value is null.

It can change after call to Allocator::map_memory, Allocator::unmap_memory. It can also change after call to Allocator::defragment if this allocation is passed to the function.

pub fn get_user_data(&self) -> *mut c_void[src]

Custom general-purpose pointer that was passed as AllocationCreateInfo::user_data or set using Allocator::set_allocation_user_data.

It can change after a call to Allocator::set_allocation_user_data for this allocation.

Trait Implementations

impl Clone for AllocationInfo[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Sync for AllocationInfo[src]

impl Send for AllocationInfo[src]

impl Debug for AllocationInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]