[−][src]Struct vk_mem::AllocationInfo
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(&self) -> 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
impl Unpin for AllocationInfo
impl RefUnwindSafe for AllocationInfo
impl UnwindSafe for AllocationInfo
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,