[][src]Struct vk_mem::Allocation

pub struct Allocation { /* fields omitted */ }

Represents single memory allocation.

It may be either dedicated block of ash::vk::DeviceMemory or a specific region of a bigger block of this type plus unique offset.

Although the library provides convenience functions that create a Vulkan buffer or image, allocate memory for it and bind them together, binding of the allocation to a buffer or an image is out of scope of the allocation itself.

Allocation object can exist without buffer/image bound, binding can be done manually by the user, and destruction of it can be done independently of destruction of the allocation.

The object also remembers its size and some other information. To retrieve this information, use Allocator::get_allocation_info.

Some kinds allocations can be in lost state.

Methods

impl Allocation[src]

pub fn null() -> Allocation[src]

Trait Implementations

impl Clone for Allocation[src]

impl Copy for Allocation[src]

impl Debug for Allocation[src]

impl Send for Allocation[src]

impl Sync for Allocation[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.